Generalized Probabilistic Attention Mechanism in Transformers