1. A computer-implemented method for binning defects detected on a specimen, comprising: performing on a computer processor the following steps: comparing a test image to reference images, wherein the test image comprises an image of one or more patterned features formed on the specimen proximate to a defect detected on the specimen, and wherein the reference images comprise images of one or more patterned features associated with different regions of interest within a device being formed on the specimen; and if the one or more patterned features of the test image match the one or more patterned features of one of the reference images, assigning the defect to a bin corresponding to the region of interest associated with the one of the reference images.