Attention State Machine