Migrating in a warming world: A deep learning approach to predict pan-American seasonal shifts in the monarch butterfly niche

Chiara Vanalli, Robin Zbinden, Nina van Tiel, Devis TuiabioRxiv 2025 · DOI

TL;DR

This paper introduces a novel time-aware deep learning model for predicting the ecological niche of migratory species, specifically the monarch butterfly. By incorporating seasonal climate data and a sequential framework, their model outperforms traditional static models and offers crucial insights into how climate change will impact monarch migration and overwintering grounds.

What Problem Does This Paper Address?

Migratory species are particularly vulnerable to climate change because their survival depends on specific environmental conditions that shift throughout the year. Traditional species distribution models (SDMs) often treat environmental data as static, failing to capture the crucial temporal dynamics of migration. This limitation hinders accurate predictions of how migratory species' ranges will change, making effective conservation planning difficult. The monarch butterfly, with its iconic long-distance migration, serves as a critical case study for this problem.

Methods

The authors developed a "time-aware deep learning species distribution model" (deep SDM). This approach uses a sequential framework, meaning the model considers the output of one season as an input for the next, effectively capturing the temporal dependencies in the monarch's migratory cycle. They employed Multi-Layer Perceptrons (MLPs) and compared three model architectures:

  • M0 (Time-static): Uses annual average climate data.
  • M1 (Seasonal independent): Uses monthly climate data for each season independently.
  • M2 (Seasonal concatenated): Uses monthly climate data and the predicted probability of occurrence from the previous season, creating a continuous, time-aware prediction.

To understand the drivers of these predictions, they utilized Shapley values, an explainable AI (XAI) technique, to quantify the importance and directional effect of each climatic predictor on the monarch's niche.

Datasets

The study utilized monarch butterfly occurrence data collected from scientific and citizen science sources (e.g., GBIF) spanning from 2010 to 2024. For historical validation (1990-2004), they used data lacking seasonal information. Climatic data (temperature, humidity, precipitation, cloud coverage, etc.) were sourced from the Coupled Model Intercomparison Project Phase 6 (CNRM-CM6-1-HR model) at a spatial resolution of approximately 0.5x0.5 degrees, available at a monthly resolution. Future climate projections were based on different Shared Socioeconomic Pathways (SSPs): SSP1-2.6 (sustainable), SSP2-4.5 (intermediate), and SSP5-8.5 (fossil-fuel intensive).

Key Insights and Ideas

  • Seasonality is paramount for migratory species: The study strongly emphasizes that ignoring the temporal, seasonal dynamics of climate significantly limits the accuracy of species distribution models for migratory animals.
  • Deep learning excels at temporal modeling: The sequential deep learning approach (M2) demonstrated a superior ability to capture the complex, year-round migratory cycle of the monarch.
  • Climate drivers are spatially and temporally variable: The importance and impact of climatic factors like humidity, temperature, and precipitation vary significantly across seasons and geographic locations, underscoring the need for season-aware modeling.
  • XAI reveals critical climate threats: Shapley values pinpointed specific climatic changes (e.g., decreased precipitation and humidity) as key drivers behind the predicted contraction of crucial overwintering sites.

Key Results

  • The seasonal concatenated model (M2) consistently outperformed the time-static model (M0) and seasonal independent model (M1) across various performance metrics (AUCROC, AUCPR, TSS), both in the present and when validated on past data. For instance, M2 showed a +15% increase in TSS compared to M0 for past data.
  • The model accurately reproduced the monarch's known migratory routes and identified suitable areas for year-round presence, aligning with known stable populations.
  • Under climate change scenarios (especially SSP5-8.5), the model predicts a significant northwestward shift in the monarch's niche by the end of the 21st century. This includes expansion into Canada and a notable contraction in key overwintering areas like California and Central America.
  • The study identified humidity and precipitation as critical factors contributing to the predicted loss of suitable overwintering habitat.

Limitations and Future Work

The authors acknowledge several limitations:

  • Predictive accuracy in extreme scenarios: While the model performs well, its accuracy in vastly different future climatic settings remains a point of caution.
  • Evolutionary dynamics: The current model does not account for potential evolutionary adaptations to future climates.
  • Inter-annual climate variability: The model primarily focuses on intra-annual (seasonal) variability and does not explicitly incorporate inter-annual climate fluctuations.
  • Biotic interactions: The study focuses solely on climatic drivers and does not include biotic interactions (e.g., milkweed availability, predators, diseases), which are crucial for monarch survival.

Future work could involve integrating these biotic factors, developing year-by-year modeling for short-term forecasting, and applying the time-aware deep learning framework to other migratory species to advance conservation efforts globally.

Summary updated

Abstract

Abstract Climate change is driving biodiversity loss, disrupting ecosystem functioning, and altering species distributions. Migratory species, whose range varies across seasons depending on specific climatic conditions, are particularly sensitive to environmental changes and serve as indicators of ecosystem health. However, current species distribution models often fail to capture the temporal dynamics critical for migratory species, limiting their ability to provide accurate future range estimations. In this study, we address this gap by developing a time-aware deep learning species distribution model for the monarch butterfly ( Danaus plexippus ), an iconic species for biodiversity conservation. Using monarch occurrence records across the Americas gathered from scientific and citizen science sources, we embed the effect of monthly climatic variables in a sequential framework. We compare the performance of our seasonal model to conventional time-static baselines, showing not only better performance in the present, where the models have been trained and validated, but also in the past. Our findings show that climatic factors such as humidity, temperature, precipitation and cloud coverage strongly influence the ecological niche of the monarch butterfly, with notable seasonal and spatial variability. Applying our model under climate change scenarios, we predict a northwestward shift in the monarch range by the end of the XXI century, with expansion in Canada and significant contraction in California and Central America, key sites for overwintering that also host resident monarch populations. These changes could severely impact the species migratory cycle and population stability. Using Shapley values, an explainable AI technique, we identify the decrease in precipitation and humidity as important environmental drivers responsible for the contraction of overwintering sites. By focusing on a species of high ecological relevance through a time-aware modeling approach, this work brings novel insights for the conservation of migratory species in the face of the challenges posed by climate change.
BibTeX
@misc{vanalli2025migrating,
  author = {Chiara Vanalli and Robin Zbinden and Nina van Tiel and Devis Tuia},
  title = {{Migrating in a warming world: A deep learning approach to predict pan-American seasonal shifts in the monarch butterfly niche}},
  year = {2025},
  doi = {10.1101/2025.06.25.661455},
  howpublished = {bioRxiv},
}
Figure