To make each position not attend to the position in different constituents, Tree Transformer constrains the attention probability matrix E by constituent prior C as below, where is the element-wise multiplication.
if C i,j has small value, it indicates that the positions i and j belong to different constituents, where the attention weight E i,j would be small.