A learned mechanism that controls how much an attention head focuses on different parts of the input.