All writing

March 10, 2026

Why Amazon's Grid-Based Defect Detection Was Wrong

Written with Claude

Amazon's last-mile delivery depends on accurate map data. If a driver's navigation takes them to the wrong side of a building, directs them down a one-way street in the wrong direction, or routes them along a road that does not actually connect — that is a failed delivery. At scale, map errors are a meaningful operational cost.

My job for three years was finding those errors before they caused problems. We analyzed US map data: road geometry, turn restrictions, address point accuracy, route connectivity. When we found a confirmed defect, we logged it and triggered a correction.

The team used a grid-based system to organize this work. Specifically, we used MGRS — the Military Grid Reference System — which divides geographic space into a hierarchy of nested grid cells. The idea was sensible: divide the map into cells, assign analysts to cells, work through them systematically.

The problem was what happened at the edges.


The Boundary Problem

MGRS cells have hard edges. A road that runs along a cell boundary exists in two cells simultaneously, but for analytical purposes it gets assigned to one. Defects near that boundary — or defects that cluster around a confirmed error point that happens to sit near an edge — frequently fell outside the assigned cell.

Here is a concrete version of what this looked like in practice:

An analyst confirms a wrong-turn restriction at an intersection near the edge of cell A47. The intersection itself is in A47. The related road segments that should also be flagged — the upstream approach road with the incorrect geometry, the downstream segment with a missing restriction — those might be in A48.

A47's analyst finds the defect and logs it. A48's analyst is working on a completely different part of their cell. The related defects sit undetected.

The grid did not cause the underlying map errors. But it caused us to detect fewer of them than we should have. Our precision was good — when we found a defect, it was real. Our coverage was the problem.


Rethinking the Unit of Analysis

The grid was the wrong tool because map errors do not respect grid boundaries. Navigation defects cluster around physical features — intersections, road terminations, geometry irregularities, address range transitions. The relevant unit is not a rectangle on a coordinate system. It is a radius around a confirmed problem.

The model I proposed was a sphere-based approach — or more precisely, a radius-based approach applied to a two-dimensional coordinate space, treating confirmed defect points as centers.

When an analyst confirms a defect at coordinates (x, y), the algorithm generates a search radius around that point — configurable, but typically matching the scale of a city block. Every related road segment, intersection, and address point within that radius becomes a candidate for secondary review.

The logic was:

  • Confirmed defects are not random. They occur where map data quality is poor.
  • Where quality is poor in one respect, it tends to be poor in adjacent respects.
  • The grid ignores this clustering. The radius model exploits it.

The Comparison

To validate the approach, I ran both models over the same geographic area — a patch of roughly 15 square kilometers in a mid-sized US city with a known concentration of historical defects.

The grid-based approach found 100 confirmed defects in that area over a standard analysis period.

The radius-based approach found 150.

Fifty additional real defects in the same geographic space, in the same time window, using the same analyst effort. The difference was entirely in the detection geometry.

The additional defects were not marginal catches. Several were meaningful navigation errors — wrong turn restrictions, missing road connections — that the grid had consistently missed because they fell near cell boundaries or just outside the assigned search area.


What This Generalizes To

The lesson is not specifically about map data or MGRS grids. It is about the relationship between your analysis method and what you can see.

The shape of your analytical model determines the shape of what it can detect. A grid finds grid-shaped things. A boundary-aware, cluster-sensitive model finds clustered things. If your errors cluster — and in most real-world systems they do, because underlying causes tend to be localized — then a boundary-blind model will systematically miss a portion of them.

Before you accept a detection rate as ground truth, ask whether the detection method has a structural blind spot. Often it does. Often that blind spot is in exactly the places where errors are most likely to concentrate.

The algorithm I built was adopted permanently. It is still in use.