The universal law of generalization is a theory of cognition originally posited by Roger Shepard. According to it, the probability that a response to one stimulus will be generalized to another will be a function of the distance between the two stimuli. "Generalization" in this case is measured by means of confusion error, while the use of "distance" depends on the assumption that stimuli will be compared in some kind of psychological space (the latter being typical of Shepard's work).
Using experimental evidence from both human and non-human subjects, Shepard hypothesizes, more specifically, that probability of generalization will fall off exponentially with the distance measured by one of two particular metrics. His analysis goes on to argue for the universality of this rule for all sentient organisms due to evolutionary internalization.