[Paper Review] Information Aggregation for Multi-Head Attention with Routing-by-Agreement
This paper proposes a routing-by-agreement mechanism to improve information aggregation in multi-head attention, replacing standard linear concatenation with iterative attention routing that assigns parts (attention heads) to a whole (final representation) based on agreement. Experiments show consistent gains in linguistic probing and machine translation, with a 25% reduction in parameters yielding performance comparable to larger models.
Multi-head attention is appealing for its ability to jointly extract different types of information from multiple representation subspaces. Concerning the information aggregation, a common practice is to use a concatenation followed by a linear transformation, which may not fully exploit the expressiveness of multi-head attention. In this work, we propose to improve the information aggregation for multi-head attention with a more powerful routing-by-agreement algorithm. Specifically, the routing algorithm iteratively updates the proportion of how much a part (i.e. the distinct information learned from a specific subspace) should be assigned to a whole (i.e. the final output representation), based on the agreement between parts and wholes. Experimental results on linguistic probing tasks and machine translation tasks prove the superiority of the advanced information aggregation over the standard linear transformation.
Motivation & Objective
- To investigate whether standard linear transformation for multi-head attention aggregation is sufficient for capturing rich representational information.
- To explore advanced aggregation mechanisms—specifically, routing-by-agreement—beyond linear transformations in multi-head attention.
- To evaluate the effectiveness of routing-based aggregation on linguistic probing and machine translation tasks.
- To identify an efficient configuration that balances performance and computational cost, particularly in terms of training and inference speed.
Proposed method
- The method treats multi-head attention outputs as 'parts' and the final representation as a 'whole', framing aggregation as a parts-to-whole assignment problem.
- It employs the EM routing algorithm to iteratively update routing weights based on agreement between parts (attention heads) and the whole (final output representation).
- The routing process uses dynamic routing with attention-based agreement scores to determine how much each head's output contributes to the final representation.
- The approach is applied selectively—only to the low-level two layers of the encoder in the Transformer model—to balance efficiency and performance.
- The routing mechanism replaces the standard linear transformation in multi-head attention, preserving model architecture while enhancing representational expressiveness.
- The method is evaluated on linguistic probing tasks and machine translation benchmarks (WMT14 En→De and WMT17 Zh→En).
Experimental results
Research questions
- RQ1Is the standard linear transformation for aggregating multi-head attention outputs sufficient to capture the full expressiveness of distinct attention heads?
- RQ2Can a routing-by-agreement mechanism improve the quality of representations learned by multi-head attention in NLP tasks?
- RQ3How does the routing-based aggregation affect translation performance and training efficiency across different model configurations?
- RQ4What is the optimal placement (layer depth) of routing-based aggregation to balance performance and computational cost?
Key findings
- The routing-by-agreement mechanism significantly improves performance on 10 linguistic probing tasks, indicating that the aggregated representations capture more syntactic and semantic information.
- On WMT14 En→De and WMT17 Zh→En translation tasks, the proposed method consistently outperforms the standard Transformer baseline across both Transformer-Base and Transformer-Big models.
- Applying routing only to the low-level two encoder layers achieves a favorable trade-off, reducing training time by 37.5% while maintaining high performance.
- The Transformer-Base model with effective aggregation achieves performance comparable to the larger Transformer-Big model, despite having about two-thirds fewer parameters.
- Routing applied to all layers or multiple components (e.g., encoder and decoder) leads to significant speed degradation without proportional gains, indicating diminishing returns.
- The routing mechanism is shown to be a powerful alternative to linear aggregation, with empirical validation across diverse NLP tasks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.