Wildlife-vehicle collisions are a problem where the solution is not simply “build more wildlife crossings.” Crossings, fencing, warning systems, and other mitigation measures are expensive, while conservation and transportation agencies have limited resources.

That led us to a simple question:

If we can only investigate or prioritize a small fraction of roads, which ones should we look at first?

Existing roadkill observations already contain useful information about where collisions have happened. We wanted to see whether machine learning could combine that history with environmental and geographic information to produce a better way of prioritizing future hotspots.

That became Roadkill Oracle.

How we built it

We started with publicly available California roadkill observations and divided the study area into approximately 1 km grid cells containing roads.

For each cell, we collected features describing its environment and road context, including historical collision patterns, road characteristics, proximity to water, elevation, and geographic information.

We trained separate models for:

  • Mammals
  • Reptiles
  • Amphibians
  • All species

Rather than training a large neural network, we used lightweight logistic-regression models. This was a deliberate choice: our data is primarily structured geographic/tabular data, so a simpler model can be trained quickly on a CPU and is considerably easier to interpret.

The models learn from information available during 2018–2020 and are tested against collisions occurring during 2021–2025.

This distinction was important to us. We didn't want to randomly split the observations and accidentally let information about future collisions leak into training. We also used spatially grouped validation to reduce the possibility that nearby observations make the model appear more accurate than it really is.

The final system produces a relative collision-risk score for each road cell, which can then be displayed on an interactive map.

What we learned

One of the biggest lessons was that a model can appear useful while still answering the wrong question.

Our initial prototype focused on the South San Francisco Bay Area. The data there was heavily dominated by Pacific Newt observations, so a model trained on that subset could easily look like a general wildlife-collision model while actually learning a much narrower ecological pattern.

We expanded the project to multiple California regions and separated the models by wildlife group. This gave us a more meaningful test of whether the approach generalized beyond one particular species and location.

We also learned that a simple model can be surprisingly effective. We initially considered more sophisticated machine-learning approaches, but logistic regression was fast enough to iterate on, interpretable, and produced useful predictive performance without requiring a GPU.

Most importantly, we learned to compare the model against a simple baseline rather than assuming that “AI” automatically makes a solution better.

Historical collision density is already a strong predictor: if a road has experienced many collisions before, it is reasonable to expect more collisions there later. Roadkill Oracle therefore has to beat that simple strategy to justify its additional complexity.

In our evaluation, it did. The models achieved ROC-AUC scores of approximately 0.71–0.74 across the major wildlife groups and consistently outperformed the historical-density baseline. The top 10% of predicted areas captured approximately 33–39% of held-out collisions, depending on the wildlife group.

These results suggest that environmental and geographic context can add useful predictive information beyond simply looking at historical collision counts.

Challenges

The biggest challenge wasn't training the model. It was making sure the model was actually learning something meaningful.

Roadkill data has inherent biases. A location with no recorded collision may not be a location with no collisions; it may simply be a location where nobody reported one. Observation effort also varies substantially between regions.

We therefore had to be careful about interpreting the model as a predictor of absolute collision probability. Roadkill Oracle is better understood as a relative-risk ranking system.

Another challenge was geographic scale. A very fine grid gives more precise predictions but dramatically increases the amount of geographic data that has to be processed. We ultimately chose approximately 1 km cells as a practical compromise between spatial resolution and computational cost.

We also deliberately avoided relying on paid APIs or GPU infrastructure. The entire ML pipeline can run locally on CPU, which made experimentation much faster and keeps the project accessible.

Where we'd take it next

The current system covers 10 California regions rather than the entirety of the state. Expanding coverage while maintaining consistent data quality would be an important next step.

We would also like to incorporate better habitat and land-use information, investigate species-specific models, and test whether the predictions remain useful when applied to completely new geographic regions.

Ultimately, the goal isn't to tell conservationists that an algorithm knows exactly where an animal will be hit.

It's to answer a more practical question:

When resources are limited, where should we look first?

Roadkill Oracle is our attempt to turn existing environmental data into a tool for making that decision more intelligently.

Built With

Share this project:

Updates