Skip to main content
Dr Andrew Lensen

Machine Learning for Ecosystems and Climate

Forests, floods, fisheries, and species identification across Aotearoa

Overview

Ecologists and earth scientists now hold far more data than they can analyse by hand: fifty years of forest plots, satellite imagery, and long-term monitoring records. This programme pairs machine learning with domain expertise to turn those records into evidence about how ecosystems are changing, and to make environmental monitoring cheaper and more scalable. Where the kākā project works at the level of the individual animal, this work operates at the scale of populations, communities, and landscapes.

Themes

  • Forests under a changing climate. Ilya Shabanov's PhD, with Assoc. Prof. Julie Deslippe and Prof. Jonathan Tonkin (University of Canterbury), used New Zealand's national forest inventory to work out how forests are reassembling as the climate warms. His Abundance Trend Indicator learns the conditions under which a species' abundance has risen or fallen, and maps where each species' current range is mismatched to the habitat it could occupy. Applied to thousands of forest plots and most of the woody species in the national canopy, with climatic, topographic, soil, and biological predictors, it confirms the upward and poleward shifts seen worldwide, but also identifies drivers such as soil pH, grazing, and climate stability for the species moving the other way. Companion work spanning five decades of plot records shows forest composition shifting towards warm-adapted lowland species as temperatures rise and rainfall falls. A by-product is SALMA, a semi-automated tool for measuring leaf morphology in the small-leaved plants that existing methods handle poorly.
  • Flood forecasting. Nimasha Herath's PhD, with Dr Anya Leenman (Université de Sherbrooke, Canada) and Dr Mairéad de Róiste (Geography), combines deep learning with Earth observation data to forecast floods in Aotearoa, where gauged catchments are sparse and recent events have shown the cost of late warning.
  • Interpretable species identification. With Sara Gonzalez and Philip Lavretsky (University of Texas at El Paso), as part of Sara's doctoral research, we built trait-specific image classifiers trained on photographs of genetically characterised birds, so a classification rests on scored diagnostic traits rather than a single opaque output. Distinguishing the Mexican Duck from the Mallard, two species experts struggle to separate, the trait models exceeded 90% balanced accuracy on a small dataset, and heatmaps revealed where the models were attending to background rather than the bird.
  • Fisheries monitoring. Michael Stanley's MSc, with Prof. Mengjie Zhang, estimated the length of tarakihi from images using a U-Net segmentation model. Predictions were on average within one centimetre of the measured length, a step towards monitoring the catch that currently goes unrecorded on vessel.

Team and collaborators

Dr Andrew Lensen

Dr Andrew Lensen

Senior Lecturer in Artificial Intelligence

Ilya Shabanov

Ilya Shabanov

PhD (completed 2026): climate-driven forest reassembly

Nimasha Herath

Nimasha Herath

PhD student: deep learning for flood forecasting

Prof. Jonathan Tonkin

Prof. Jonathan Tonkin

University of Canterbury

Dr Anya Leenman

Dr Anya Leenman

Université de Sherbrooke

Michael Stanley

Michael Stanley

MSc student: fish length estimation

Selected outputs

  • Shabanov, I., Lensen, A., Tonkin, J., & Deslippe, J. (2026). A machine learning framework for mapping shifts in species' abundance from long-term monitoring data. Journal of Ecology. PDF
  • Shabanov, I., Deslippe, J., & Lensen, A. (2026). SALMA: A Machine Learning Tool for Precise Leaf Morphology Measurements. Ecological Informatics. PDF
  • Gonzalez, S., Lensen, A., & Lavretsky, P. (2026). Interpretable Wildlife Classification by Coupling Genetics, Scoring Systems, and Computer Vision. SSRN preprint. PDF
  • Shabanov, I., Tonkin, J., Lensen, A., & Deslippe, J. (2025). Climate-Driven Forest Reassembly Follows Divergent Functional Pathways in Cold- and Warm-Adapted Communities. bioRxiv preprint. PDF
  • Stanley, M., Lensen, A., & Zhang, M. (2022). Using Neural Networks to Automate Monitoring of Fish Stocks. IEEE SSCI. PDF

See the publications page for the full list.