(2017) introduce structured attention networks which are generalizations of the basic attention procedure, allowing to learn sentential representations while attending to partial segmentations or subtrees.
they take into account the dependency structure of a sentence by viewing the attention mechanism as a graphical model over latent variables.