Hebbian Rules in Neural Networks