Predicting butterfly species presence from satellite imagery using soft contrastive regularisation

Thijs L. van der Plas, Stephen Law, Michael Jo PocockWorkshops @ CVPR 2025

Abstract

Monitoring biodiversity is essential for conservation, yet traditional field surveys are resource-intensive and difficult to scale. This paper presents a deep learning framework to predict butterfly species presence in the UK directly from Sentinel-2 satellite imagery. We introduce the Paired Embeddings Contrastive Loss (PECL), a novel "soft" contrastive regularizer that leverages the similarity of species-presence profiles between locations. Our approach outperforms standard ecological baselines and standard CNN architectures, achieving a Top-10 accuracy of 70.4% across 62 species. These results demonstrate that spectral signatures from space can serve as effective proxies for the micro-habitats and landscape configurations that support specific animal populations.

Introduction

Biodiversity monitoring is a cornerstone of ecological conservation, providing the data necessary to track species decline and evaluate the success of habitat restoration. However, the scale of traditional surveys is limited by the availability of expert volunteers and field access. Remote sensing offers a scalable alternative with global coverage, but its application has largely been restricted to broad land-cover classification rather than direct species distribution modeling. Small animals, such as butterflies, are not directly visible in 10-meter resolution satellite data. This study bridges this gap by training a model to recognize the environmental "spectral signatures" associated with specific butterfly communities.

Methods

The proposed architecture utilizes a ResNet-18 backbone pre-trained on the SeCo satellite imagery dataset. To handle the probabilistic and noisy nature of ecological data, we introduce the Paired Embeddings Contrastive Loss (PECL). Unlike traditional supervised contrastive learning that groups images into discrete, "hard" classes, PECL employs a "soft" similarity metric based on the cosine similarity of species-presence vectors (encounter rates) between sites.

Overview of the S2-BMS dataset, species similarity distributions, and sample satellite tiles.

This loss function regularizes the network by ensuring that locations with similar ecological profiles are mapped to similar points in the internal embedding space, even when visual differences in satellite tiles are subtle. The final prediction is performed by a Multi-Layer Perceptron (MLP) head trained with Binary Cross-Entropy (BCE) to output the probability of presence for 62 butterfly species.

Dataset: S2-BMS

We introduce the S2-BMS dataset, which pairs Sentinel-2 multispectral imagery (RGB + Near-Infrared bands) with 8 million records from the UK Butterfly Monitoring Scheme (UKBMS). The dataset covers 1,329 geo-matched locations across the UK, each represented by a 4 $km^2$ satellite tile ($256 \times 256$ pixels). Labels consist of probabilistic encounter rates for 62 unique species, derived from repeated volunteer visits over a two-year period (2018–2019).

Results

The PECL-enhanced model demonstrates superior performance compared to both a simple "mean rate" baseline and a standard supervised CNN.

Model Top-10 Accuracy Mean Squared Error (MSE)
Baseline (Mean Rate) 67.3% 1.39e-02
Standard CNN (ResNet-18) 69.6% -
PECL Enhanced (Ours) 70.4% 1.20e-02

The model's performance is particularly notable in biodiversity hotspots, where it effectively identifies the complex environmental conditions required by habitat specialists, which simpler statistical models often miss.

Discussion and Conclusion

Our findings suggest that deep learning can extract subtle ecological indicators from satellite imagery that are invisible to the human eye. While the model faces challenges with extremely rare species (presence <1%) and spatial noise within the 4 $km^2$ tiles, the introduction of soft contrastive regularisation significantly improves multi-species prediction. Future work will explore the integration of additional geospatial layers, such as climate, soil type, and elevation, to further refine these biodiversity maps and support global conservation efforts.

Summary updated

BibTeX
@inproceedings{plas2025predicting,
  author = {Thijs L. van der Plas and Stephen Law and Michael JO Pocock},
  title = {{Predicting butterfly species presence from satellite imagery using soft contrastive regularisation}},
  booktitle = {Workshops @ CVPR},
  year = {2025},
}
Figure