Explain the mathematical difference between attention mechanisms in transformers and traditional RNNs.