Based on the task requirements, logical constraints of the attention mechanism have been designed to control the learning process of network, which enhances the controllability in learning.
a logical constraint is an operation that affects the attention weight.