The Stimulus Equivalence paradigm studies the learning of stimulus classes (categories) composed of functionally equivalent stimuli with or without perceptual similarities. The relations between stimuli in a class can either be learned or be derived from other stimulus relations: if stimulus A is equivalent to B, and B to C, then the equivalence between A and C can be derived without explicit training. There has been little work on the mechanisms underlying equivalence class formation. Here we present a neurobiologically plausible neural network model of stimulus class learning. The network successfully models three classic studies on stimulus equivalence. The Hebbian weights in the model describe the formed equivalences and the levels of association between class members, and resulting activation patterns are correlated with the response accuracy and response latencies in the original studies. The model predicts that stimulus equivalence formation depends on the environmental regularities of stimuli occurrence and co-occurrence.