1. A method performed by one or more processors of one or more server devices, the method comprising: extracting a feature from an image; determining a first score for the image based on the extracted feature, the first score representing a likelihood that the image contains inappropriate content based on the extracted feature; generating a first set of statistics for the extracted feature representing a distribution of the feature across other images on at least one first document with which the image is associated; generating a second set of statistics based on the first score, the second set of statistics representing a distribution of the first score across the other images on the at least one first document; determining a second score for a second document that contains the image or refers to the image, the second score representing a likelihood that the second document contains inappropriate content; generating a third set of statistics based on the second score, the third set of statistics representing a distribution of the second score across the at least one first document; determining a third score for the image based on the first score, the first set of statistics, the second set of statistics, the second score, and the third set of statistics; and using the third score to determine whether to provide the image to a user.