PhD Thesis: Exploring the role of (self-)attention in cognitive and computer vision architecture