The science under Understory

Identification with a guarantee

Pulling a native plant by mistake is the costliest error a volunteer can make, and American bittersweet, staghorn sumac and black walnut all have invasive look-alikes. So Understory’s classifier gives one of four decisions. PULL means a core invasive target, DON’T PULL means a native or look-alike is most likely, and OTHER INVASIVE means a secondary invasive such as barberry or buckthorn. Otherwise it says INSPECT and asks for the view that settles it, such as where the fruit grows on a bittersweet vine.

A BioCLIP 2 foundation model, adapted with LoRA, is the teacher. It is distilled into BioCLIP’s much smaller ViT-B/16, which runs offline on an iPhone as a 57.9 MB Core ML model.

τ=min⁡{ s(k)  :  FBeta⁡(n−k+1, k)(α)≥1−δ }\tau = \min\left\{\, s_{(k)} \;:\; F_{\operatorname{Beta}(n-k+1,\,k)}(\alpha) \ge 1-\delta \,\right\}

Everything is tested on a geographic holdout of every Massachusetts photo, 16,987 photos by 3,940 people, none of whom appears in training. The shipped threshold is calibrated on Massachusetts photos too, so its error rates come from cross-validation over map blocks. It is calibrated on four folds and tested on the fifth, with that fold’s photographers removed.

Invasive targets

4,733 photos

Look-alikes

4,494 photos

Other invasives

3,221 photos

Native plants

4,539 photos

Figure 1. Decisions on the MA holdout. How often the app gave each answer for 16,987 Massachusetts photos, grouped by what the plant really is.

The hardest case is highbush blueberry with red leaves in October, which looks like burning bush. Patch extent is measured without LiDAR: ARKit visual-inertial odometry plus Depth Anything V2 monocular depth, scale-aligned to ARKit’s feature points.

My field testing

My first review of field photos, taken at dusk, simply accepted the app’s suggestions, so I labeled every plant again without seeing its answers. On 126 plants at Turning Mill Pond and Wright Farm, the app caught 21 of 22 invasive targets and told just 1 of 82 natives and look-alikes to PULL, a raspberry shot at 4.7× zoom, so its camera now stops at 2×. It named the species right for 56 of the 61 plants it has a class for.

Seeing next year’s problem

Spread on a 2-meter grid

Each surveyed patch spreads in a stage-structured stochastic integrodifference model: plants grow in place, then seeds, fruit and rhizome fragments travel by each species’ dispersal kernel, with rare long jumps, and settle where the habitat allows. A Monte Carlo ensemble turns that into a probability of invasion for every 2 m cell, year by year, and into the area that clearing each patch would prevent. Every one of the model’s numbers cites its source in the literature.

The simulator is C++. The API runs it natively; the map runs the same code compiled to WebAssembly, so the impact of skipping a patch is simulated in your browser.

Understory’s integrodifference model fits in one line. Next year’s density of plants nt+1n_{t+1} at a point xx adds up what this year’s plants f(nt)f(n_t) produce at every point yy, carried to xx by the dispersal kernel kk, and keeps what the habitat H(x)H(x) lets settle there.

nt+1(x)=H(x)∫k(x−y) f(nt(y)) dyn_{t+1}(x) = H(x) \int k(x-y)\, f\big(n_t(y)\big)\, \mathrm{d}y
Curves of the share of seeds carried beyond each distance, on log axes: bittersweet and burning bush reach past a kilometer, tree of heaven a few hundred meters, knotweed a few meters.
Figure 2. How far each species travels. The share of seeds and rhizome fragments carried farther than each distance. Birds take bittersweet and burning bush seeds hundreds of meters, while knotweed spreads only a few meters by rhizome.

If nobody acts, Turning Mill Pond’s 18 surveyed patches are expected to cover 66,556 m² by 2031, and clearing its most valuable patch, a burning bush, this fall prevents 4,490 m² of that. On an Apple M5 Max the simulator runs 172 five-year simulations a second on a 400 × 400 grid, and in your browser it runs at about 0.6 times its native speed.

Learned habitat

Where a seed can establish used to come from hand-written rules. Species distribution models now learn it from 22,271 iNaturalist plant records in and around Lexington, against a 2 m stack of lidar, terrain and land-cover covariates. Records of all plants, made by the same people on the same paths, serve as the background, so the models learn habitat rather than where people walk.

Four maps of Lexington in a grid, one per species, shaded by learned habitat suitability with iNaturalist presence sites as dots.
Figure 3. Where each plant can grow. Learned habitat suitability across Lexington and 1 km around it, from 0 (pale) to 1 (dark). Each map is an ensemble of MaxEnt and boosted trees for one species, and the dots are the iNaturalist presence sites it learned from. The inner outline is the town line.
Eight maps of Turning Mill Pond in four rows, one per species: hand-rule suitability on the left, learned suitability on the right.
Figure 4. Rules against learning, cell by cell. Turning Mill Pond on a 2 m grid under the hand rules (left) and the learned ensemble (right), on the color scale of Figure 3. The black outline is the property, thin lines are trails and dots are iNaturalist presence sites. Every forecast records which of the two it ran on.

Town by town, statewide

A Bayesian discrete-time hazard model, fit in Stan to the state’s listings from 2021 on, estimates each of Massachusetts’ 351 towns’ chance of a first spotted-lanternfly listing next year, from road and rail connectivity to infested towns, population, host trees and iNaturalist effort. It was tested prospectively: fit only through 2025, then scored on what happened in 2026.

Massachusetts towns shaded by their chance of being listed in 2027; already-listed towns in black; the six likeliest towns labelled, Bedford among them.
Figure 5. Where spotted lanternfly is likely to be listed next. Each unlisted town’s chance of a first listing in 2027. About 32 new towns are expected (90% interval 8–67). The green outline is Massachusetts’ 5th Congressional District, where Bedford, at 69%, is the only one of 23 cities and towns not yet listed. Labels mark the six towns most likely to be listed.
Histogram of the predicted number of towns newly listed in 2026, centered near 57, with a line at the 55 that were listed.
Figure 6. How many towns? The bars show the model’s forecast of how many towns would be newly listed in 2026, made with data only through 2025. It expected 57 (90% interval 18–109), and 55 were listed. Most of the spread comes from not knowing how fast the state will list towns in a new year.
  • 13Seen on iNaturalist first

  • 61Same year

  • 58Listed by the state first

  • 33No iNaturalist sighting

Figure 7. Did citizen scientists see it first? Each dot is one of the 165 towns the state listed as infested from 2021 to 2026. iNaturalist users reported spotted lanternfly before the listing in 13 of them, by a median of one year. The state records only the year of a listing, so a sighting in the same year can’t be put before or after it.
MetricResult
AUC for 2026 listings0.90
Brier score0.105
New towns in 202657 vs 55
New towns in 202732
Citizen science13 of 165

Spending scarce hours

A workday is a budget of volunteer-minutes. Each surveyed patch becomes a task worth the spread that clearing it prevents over five years, estimated by the simulator, and costing the walk in and out plus the person-minutes of work, matched to the skill it needs. Bittersweet is the slow one, done in three parts as on a real workday: the brush around the vines is cleared, each vine cut free and its roots pulled, and the cut vines piled beside the patch; at the end of the day everyone carries the piles to the trailhead; then they load the dumpster.

Volunteers work in groups of two to five, as real workdays do, never alone. Timefold Solver tries every way of splitting the crew, and for each it routes the groups along the property’s trails, solving a team orienteering problem with time windows in which a group shares the work at each patch. After the most prevented spread, it minimises everyone’s time on site, so groups finish together and, when the work worth doing runs out, the day ends early instead of leaving people standing around. The API simulates the chosen patches together, so overlapping spread isn’t counted twice, and compares the plan with three rules of thumb for the same groups, replayed exactly: largest patch first, nearest patch first, and random order.

The plan is the set of patches SS that prevents the most spread. Here A5(S)A_5(S) is the area invaded in year 5 when the patches in SS are cleared now, and R(B)\mathcal{R}(B) holds every set the crew can walk to and clear within its minutes BB. Today’s planner adds up single-patch values F({p})F(\{p\}) instead.

max⁡S∈R(B)F(S),F(S)=E[A5(∅)−A5(S)]\max_{S \in \mathcal{R}(B)} F(S), \qquad F(S) = \mathbb{E}\big[A_5(\varnothing) - A_5(S)\big]
MethodPrevented (m²)PatchesWalking (min)
Random order1,6505.296.8
Nearest patch first1,9115.851.8
Largest patch first6,7844.8104.4
Most value per minute7,2146.488.7
Optimized plan, 1 s7,4356.689.9
Optimized plan, 5 s (default)7,4376.488.8
Averages over five simulated workdays, each with 60 jobs and 6 volunteers, a group of five plus one volunteer who ends at the far trailhead. The optimized plan starts from the best of the four rules above and prevents 10% more than largest patch first in the same hours. On 20 small workdays with two groups and two trailheads, it found the best possible plan every time, as checked by trying every option.

Real patches

On the real patches from my blind check, 18 at Turning Mill Pond and 7 at Wright Farm, every crew that follows the plan prevents more spread than the same crew clearing patches in trail order, the order the trail passes them.

CrewPlanned (m²)Trail order (m²)Gain
Turning Mill Pond, 3 volunteers × 2 h28,55819,277+48.1%
Turning Mill Pond, 5 volunteers × 3 h41,57130,067+38.3%
Turning Mill Pond, 8 volunteers × 3 h54,00646,591+15.9%
Wright Farm, 3 volunteers × 2 h16,5549,675+71.1%
Wright Farm, 5 volunteers × 3 h30,77421,891+40.6%
Wright Farm, 8 volunteers × 3 h39,31031,130+26.3%
Spread prevented by year 5, mean of 400 paired simulations. Patch sizes were not recorded, so every patch is a 25 m² disc.

Try it now by planning a workday for a sample crew or explore every invasive patch on the map.

Sources and reproducibility

  • Spotted lanternfly town listings from the Massachusetts Department of Agricultural Resources, queried 12 Oct 2026
  • Town boundaries, rail and highways from MassGIS, with population from the 2020 Census
  • Sightings, plant records and training photos from iNaturalist, under CC0, CC BY and CC BY-NC licenses
  • Canopy and terrain from USGS 3DEP lidar, 2021
  • Land cover, wetlands and water from MassGIS Land Cover/Land Use 2016, MassDEP wetlands and MassGIS hydrography
  • Conservation land from MassGIS Protected and Recreational OpenSpace and the Town of Lexington’s parcels
  • Trails and buildings from the Town of Lexington and OpenStreetMap contributors
  • Elevation for the 3D maps from Mapzen Terrain Tiles on AWS Open Data, built from USGS 3DEP
  • Field observations from Lexington steward patrols, with geotagged photos