A novel and general criterion for image similarity validation is introduced using the so-called a contrario decision framework. It is mathematically proved that it is possible to compute a fully automatic detection criterion to decide that two images have a common cause, which can be taken as a de nition of similarity. Analytical estimates of the necessary and su cient number of sample points are also given. An implementation of this criterion is designed exploiting the comparison of grey level gradient direction at randomly sampled points. Similar images are detected a contrario, by rejecting an hypothesis that resemblance is due to randomness, which is far more easy to model than a realistic degradation process. The method proves very robust to noise, transparency and partial occlusion. It is also invariant to contrast change and can accomodate global geometric transformations. It does not require any feature matching step. It can be global or local, only the global version is invest...