sentence1: attention mechanism has shown the effectiveness in various machine learning tasks such as image captioning and machine translation .
sentence2: spatial neural attention mechanism has been proven to be beneficial in many tasks such as image captioning .