Neurosymbolic systems of perception and cognition: the role of attention