Pith. sign in

REVIEW 3 major objections 5 minor 35 references

Improving Multi-Head Attention with Capsule Networks

T0 review · 3 major / 5 minor · reviewed 2026-08-14 · deepseek-v4-flash

Pith's one-line read A capsule layer placed after multi-head attention clusters redundant head information and improves Transformer translation quality on two language pairs.

desk verdict The capsule aggregation idea is not new and the reported parameter counts contradict the described architecture, so the headline gains are hard to trust; the placement ablation is the most useful part. read the letter →

arxiv 1909.00188 v1 pith:I6L4WIV6 submitted 2019-08-31 cs.CL

classification cs.CL
keywords multi-headattentioncapsulenetworksdynamicroutingEMneuralmachinetranslationTransformerredundancyinformationaggregation
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

This paper tries to show that the information produced by Transformer multi-head attention is redundant, because different attention heads live in subspaces that overlap, and that a capsule network inserted between multi-head attention and the feed-forward layer can fix this by clustering similar head information and preserving unique information. The authors test this on Chinese-to-English and English-to-German machine translation, comparing two routing mechanisms, Dynamic Routing and EM Routing. Both improve over the strong Transformer baseline, with EM Routing giving the larger gains. If the claim holds, capsule-based aggregation is a broadly usable component for multi-head attention in sequence-to-sequence models, and attention-head redundancy is a real, addressable cost rather than a harmless by-product.

What carries the argument

The load-bearing object is the capsule routing layer inserted between multi-head attention and the feed-forward sublayer of a Transformer. Each input capsule is one attention head's output $u_i$; a learned matrix $W_{ij}$ transforms it into a vote $\hat{u}_{j|i}$, and an iterative routing loop decides how much of each vote flows to each output capsule. Dynamic Routing refines coupling logits by dot-product agreement after a squashing nonlinearity; EM Routing treats each output capsule as a Gaussian over votes and alternates M-steps, which update means, variances, and activations, with E-steps, which update assignment probabilities. The concatenated output capsules then enter the usual feed-forward network, with a residual connection around the whole block. This mechanism is what converts redundant, overlapping attention-head outputs into a smaller set of clustered, non-redundant representations.

What would settle it

Run the same capsule layers with insertion positions fixed in advance, only after the top decoder self-attention and top encoder-decoder attention, and measure BLEU on test sets not used for architecture selection, such as NIST 03, 05, 06, and 08; if the average gain over the Transformer baseline on those sets is not positive, the central claim of consistent improvement fails.

Watch

Extended reading notes

Core claim

The discovery, on the paper's own terms, is that multi-head attention output can be treated as a set of capsules, one per head, and re-routed into output capsules before the feed-forward network. The capsule layer computes votes $\hat{u}_{j|i} = W_{ij} u_i$, then iteratively adjusts assignment probabilities $c_{ij}$ by agreement: Dynamic Routing uses the dot product between votes and squashed output capsules, while EM Routing fits a Gaussian per output capsule through expectation-maximization steps. The output capsules are concatenated and passed through a two-layer feed-forward network with a residual connection. On NIST Chinese-to-English, the average BLEU rises from 44.95 for the Transformer-Base to 45.46 with Dynamic Routing and 45.70 with EM Routing; on WMT14 English-to-German, BLEU rises from 27.34 to 27.67 and 27.77 for the Base model, and from 28.43 to 28.65 and 28.71 for the Big model. The paper also finds that the insertion helps only near the supervisory signal: putting the capsule layer after the top decoder self-attention and the top encoder-decoder attention gains points, while inserting it in encoder self-attention hurts.

Load-bearing premise

The reported gains rest on the winning insertion positions being chosen by looking at the NIST 04 test set, so if that selection has overfitted the test set, the average improvement over the baseline could be smaller than claimed on other data.

Editorial extensions

If this is right

  • The capsule layer can be added to an existing Transformer without changing the attention computation itself, so it should transfer to other sequence-to-sequence models built on multi-head attention.
  • EM Routing is the better default of the two mechanisms: it improves BLEU slightly more than Dynamic Routing while adding fewer parameters and running faster.
  • Placement is not neutral; only the top decoder self-attention and top encoder-decoder attention layers benefit, so implementations should target layers close to the output.
  • Longer source sentences benefit more, which suggests that the routing layer's clustering matters most when there is more information to aggregate.
  • The method generalizes across language pairs and model sizes, since gains appear on both Chinese-to-English and English-to-German and on both Base and Big Transformers.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • If attention heads are largely redundant, as pruning studies cited in the paper suggest, capsule routing may be an implicit, learned form of head selection: output capsules can gather information from several similar heads instead of forcing each head to stand alone.
  • The same aggregation layer could be tested on multi-head attention in pretrained language encoders and vision transformers, where head redundancy has also been reported; the paper does not run those experiments.
  • A testable consequence of the paper's placement analysis is that an auxiliary loss or reconstruction term could make deeper capsule insertions viable, because the current routing appears to need gradient proximity to the output.
  • One could check whether individual output capsules become interpretable, for instance whether they align with the specialized heads that pruning analyses identify; the paper does not report such an analysis.
Share X Bluesky LinkedIn Reddit HN

Signed reviews

No signed human review yet.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

3 major / 5 minor

Summary. The paper proposes inserting a capsule layer after multi-head attention in the Transformer, using either Dynamic Routing or EM Routing, to cluster redundant attention head outputs and preserve unique information. The authors evaluate on Zh→En (NIST 03, 04, 05, 06, 08) and En→De (WMT14) with Transformer Base and Big models. They report consistent BLEU improvements over a reproduced baseline, with EM routing slightly stronger than Dynamic Routing, and they analyze insertion positions, output capsule count, and source sentence length. The central claim is that capsule-based aggregation is a generally useful component for Transformer-based NMT.

Significance. If the empirical claim holds, this is a useful and simply stated architectural contribution: it offers a new way to address redundancy in multi-head attention and connects the capsule routing literature to Transformer-based NMT in a reproducible manner. The paper does reproduce the standard Transformer baseline, which strengthens the comparison, and the direction of the BLEU differences is consistent across almost all test sets. However, the contribution is empirical and the current support is weakened by the parameter-count inconsistency in the central tables, by test-set selection in the configuration search, and by the absence of significance and variance information for En→De. The idea is promising but not yet established.

major comments (3)
  1. [Tables 1-2; §5.2; Eq. (3)] There is an internal inconsistency in the reported parameter counts. For the claimed ED6,Dec6 insertion, the capsule layer size depends only on d_model, the number of heads h, and the number of output capsules l, not on vocabulary size. With d_model=512, h=8, and l=8, the two inserted Dynamic Routing layers contribute roughly 2 × 8 × 8 × 64 × 64 ≈ 0.52M parameters through the matrices W_ij in Eq. (3), and the EM routing version should be comparable or smaller. Yet Table 1 reports Zh→En parameter increases of 7.6M (Dynamic) and 7.1M (EM), while Table 2 reports increases of only 1.1M and 0.7M for the same two-layer insertion in En→De. These numbers cannot both be correct unless the Zh→En models insert capsules at many more positions than the claimed ED6,Dec6 configuration. Because the only statistically significant gains are in the Zh→En table, this discrepancy is load-bearing for the central claim; the authors must reconcile the parameter counts or rerun the comparison under an iso-architecture setting.
  2. [§5.3; Tables 1 and 3] The best configuration is selected on the NIST 04 test set, and that same set is then reported as evidence in Table 1. Table 3 shows that ED6,Dec6 was chosen by scanning eleven insertion schemes on NIST 04, and the resulting score 48.07 is exactly the MT04 entry in Table 1. This means the MT04 improvement in Table 1 is not a valid held-out measurement: the configuration was selected to maximize performance on it. The other NIST sets were not used for selection, but the overall claim of 'consistent improvements' over the baseline is still inflated by the inclusion of MT04 in the main evidence. The authors should select the insertion configuration on a development set such as NIST 02, or report the ED6,Dec6 result on a separate test set that was not involved in the Table 3 scan, and should state explicitly that MT04 cannot play both roles.
  3. [§5.2; Tables 1-2] The statistical support for 'consistent improvements' is weaker than the abstract and conclusion suggest. In Table 1, only MT05 and MT08 are marked as statistically significant (ρ<0.05); MT03, MT04, and MT06 are not significant. In Table 2, neither the Base nor the Big En→De results are accompanied by confidence intervals, paired significance tests, or seed-level variance, and differences such as 28.65 vs. 28.43 (Big, Dynamic) and 28.71 vs. 28.43 (Big, EM) are within the range of typical seed-to-seed BLEU fluctuations for NMT. The authors should report paired bootstrap or multiple-seed standard deviations for both language pairs and temper the 'consistent improvements' claim to the test sets and conditions that are actually significant.
minor comments (5)
  1. [§4, Eq. (14)] The EM routing equations write the Gaussian density with scalar differences (u_hat_j|i - v_j), but the quantities involved are vectors; please use the vector/Mahalanobis formulation from [10] or explicitly state the per-dimension factorization.
  2. [Table 1] The column header 'A VE.' appears to be a truncated version of 'AVE.'; please correct it.
  3. [§3, Related Work] The discussion of [35] should include a concrete architectural comparison, since both works apply routing-by-agreement to attention heads; the statement that 'the main structure of our model is different from theirs' needs to be substantiated with specific differences.
  4. [§5.3] The conclusion that any change to the encoder self-attention is harmful is drawn from differences as small as -0.04 BLEU (Enc5,Enc6) without significance tests; this claim should be weakened or supported with error bars.
  5. [§5.1] The paper does not provide the exact EM routing hyperparameters (e.g., the schedule for λ, the number of EM iterations, and the beta initialization); 'Please refer to [10] for more details' is insufficient for replication.

Circularity Check

0 steps flagged · score 0.0 of 10

No significant circularity: the capsule-layer insertion is evaluated on held-out test sets against an external Transformer baseline; no fitted quantity is renamed as a prediction.

full rationale

This paper contains no derivation chain whose conclusion is built from its own premises. The proposed method inserts a standard capsule routing layer (Eqs. 3-4 and 8-15, adapted from Sabour et al. and Hinton et al.) after multi-head attention; the contribution is architectural and evaluated empirically. The central claim of consistent BLEU improvements over Transformer is supported by held-out test sets (NIST 03/05/06/08 and newstest2014) that were not used to select the ED6/Dec6 insertion configuration; the NIST04 numbers are explicitly reported in Table 3 as a model-selection scan, not as an independent prediction. No fitted parameter is renamed as a prediction, and no self-citation carries a load-bearing argument: the authors cite external prior work for the routing mechanisms and even disclaim dependence on the similar work of Li et al. [35]. The reported parameter-count discrepancy between Zh->En and En->De is a consistency/correctness concern for the experimental tables, not a circularity in the method's derivation. Accordingly, the circularity score is 0.

Assumptions & free parameters 3 free parameters · 3 assumptions · 0 invented entities

The method introduces no new physical or mathematical entities. It relies on two domain assumptions about attention-head redundancy and the benefits of routing, plus standard evaluation assumptions. The hand-chosen hyperparameters (output capsule count, routing iterations, insertion positions) are the main free parameters that affect the reported gains.

free parameters (3)
  • number of output capsules l = set equal to number of input heads h
    Section 5.4 shows performance varies with l and peaks when l equals h; this choice is tuned on NIST 04.
  • routing iterations = 3
    Set in Section 5.1; no ablation on this count is reported.
  • insertion positions = ED6 and Dec6 only
    Selected in Section 5.3 by scanning insertion positions on the NIST 04 test set; the reported main results use this selected configuration.
assumptions (3)
  • domain assumption Overlapping subspaces of attention heads cause harmful redundant semantics that concatenation mishandles.
    Stated in the Introduction and Abstract; no direct evidence, only cited pruning results [33].
  • domain assumption Iterative routing clusters similar information and preserves unique information better than simple concatenation in this setting.
    Carried over from capsule network literature [19, 10]; assumed to hold for attention-head aggregation.
  • standard math BLEU on the chosen test sets is a valid proxy for translation quality for comparing these methods.
    Standard evaluation practice in NMT; not argued in the paper.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Improving Multi-Head Attention with Capsule Networks." pith.science (2026). https://pith.science/paper/I6L4WIV6

@misc{pith2026190900188,
  author       = {Pith},
  title        = {Pith review of: Improving Multi-Head Attention with Capsule Networks},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/I6L4WIV6}},
  note         = {Machine review of arXiv:1909.00188}
}
read the original abstract

Multi-head attention advances neural machine translation by working out multiple versions of attention in different subspaces, but the neglect of semantic overlapping between subspaces increases the difficulty of translation and consequently hinders the further improvement of translation performance. In this paper, we employ capsule networks to comb the information from the multiple heads of the attention so that similar information can be clustered and unique information can be reserved. To this end, we adopt two routing mechanisms of Dynamic Routing and EM Routing, to fulfill the clustering and separating. We conducted experiments on Chinese-to-English and English-to-German translation tasks and got consistent improvements over the strong Transformer baseline.

Figures

Figures reproduced from arXiv: 1909.00188 by the authors.

Figure 1
Figure 1. The architecture of our method Last, the output capsules v are concatenated together and fed into a feed-forward network (FFN) which consists of two linear transformations with a ReLU activation in between: FFN(x) = max(0, xW1 + b1)W2 + b2 (5) We also add a residual connection between the layer u and v [9]. Thus the final output is: O = u + FFN(v) (6) where u = Concat(u1, . . . , uh) v = Concat(v1, . . . , vl) (7) M… view at source ↗
Figure 2
Figure 2. Impact of the number of output capsules. whole model. One possible reason for this may be that the routing part should be close to the supervisory signals to be well trained. Without its help, the capsule network only extracts internal features regardless of whether these features are helpful to the transla￾tion quality. Another reason for this may be that although we add a residual connection between the input caps… view at source ↗
Figure 3
Figure 3. Effect of source sentence lengths. Last, the changes to the top sublayer of the encoder-decoder attention(ED5,ED6) and the top sublayer of the decoder self-attention(Dec5, Dec6) are beneficial for the final results because that they are more close to the output layer which supports our hypothesis above. 5.4 Impact of the Number of Output Capsules The number of output capsules l is a key parameter of our model. We as… view at source ↗

Discussion (0). Continue with ORCID to comment.

Reference graph

Works this paper leans on

35 extracted references · 20 canonical work pages

  1. [35]

    Li, Jian and Yang, Baosong and Dou, Zi-Yi and Wang, Xing and Lyu, Michael R and Tu, Zhaopeng 2019a. Information Aggregation for Multi-Head Attention with Routing-by- Agreement Proceedings of the 2019 Conference of the North American Chapter of the Asso- ciation for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), p...

  2. [1]

    Karim Ahmed, Nitish Shirish Keskar, and Richard Socher. 2017. Weighted transformer network for machine translation. arXiv preprint arXiv:1711.02132

  3. [2]

    Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473

  4. [3]

    Kehai Chen, Rui Wang, Masao Utiyama, Eiichiro Sumita, and Tiejun Zhao. 2018. Syntax- directed attention for neural machine translation. In Thirty-Second AAAI Conference on Artificial Intelligence

  5. [4]

    Kyunghyun Cho, Bart Van Merri ¨enboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning phrase representations us- ing rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078

  6. [5]

    Michael Collins, Philipp Koehn, and Ivona Ku ˇcerov´a. 2005. Clause restructuring for sta- tistical machine translation. In Proceedings of the 43rd annual meeting on association for computational linguistics, pages 531–540. Association for Computational Linguistics

  7. [6]

    Sergey Edunov, Myle Ott, and Sam Gross. 2017. https://github.com/pytorch/ fairseq

  8. [7]

    Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin. 2017. Convolutional sequence to sequence learning. arXiv preprint arXiv:1705.03122

Show all 35 references
  1. [8]

    Jingjing Gong, Xipeng Qiu, Shaojing Wang, and Xuanjing Huang. 2018. Information aggre- gation via dynamic routing for sequence encoding. arXiv preprint arXiv:1806.01501

  2. [9]

    Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778

  3. [10]

    Geoffrey E Hinton, Sara Sabour, and Nicholas Frosst. 2018. Matrix capsules with em routing

  4. [11]

    Nal Kalchbrenner and Phil Blunsom. 2013. Recurrent continuous translation models. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1700–1709

  5. [12]

    Jian Li, Zhaopeng Tu, Baosong Yang, Michael R Lyu, and Tong Zhang. 2018. Multi-head attention with disagreement regularization. arXiv preprint arXiv:1810.10183

  6. [13]

    Minh-Thang Luong, Hieu Pham, and Christopher D Manning. 2015. Effective approaches to attention-based neural machine translation. arXiv preprint arXiv:1508.04025

  7. [14]

    Fandong Meng, Zhengdong Lu, Hang Li, and Qun Liu. 2016. Interactive attention for neural machine translation. arXiv preprint arXiv:1610.05011. 12 GU. et al

  8. [15]

    Fandong Meng and Jinchao Zhang. 2018. Dtmt: A novel deep transition architecture for neural machine translation. arXiv preprint arXiv:1812.07807

  9. [16]

    Haitao Mi, Zhiguo Wang, and Abe Ittycheriah. 2016. Supervised attentions for neural ma- chine translation. arXiv preprint arXiv:1608.00112

  10. [17]

    Myle Ott, Sergey Edunov, David Grangier, and Michael Auli. 2018. Scaling neural machine translation. arXiv preprint arXiv:1806.00187

  11. [18]

    Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting on association for computational linguistics, pages 311–318. Association for Computational Linguistics

  12. [19]

    Sara Sabour, Nicholas Frosst, and Geoffrey E Hinton. 2017. Dynamic routing between cap- sules. In Advances in Neural Information Processing Systems, pages 3856–3866

  13. [20]

    Rico Sennrich, Barry Haddow, and Alexandra Birch. 2015. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909

  14. [21]

    Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. 2018. Self-attention with relative position representations. arXiv preprint arXiv:1803.02155

  15. [22]

    Tao Shen, Tianyi Zhou, Guodong Long, Jing Jiang, Shirui Pan, and Chengqi Zhang. 2018a. Disan: Directional self-attention network for rnn/cnn-free language understanding. InThirty- Second AAAI Conference on Artificial Intelligence

  16. [23]

    Tao Shen, Tianyi Zhou, Guodong Long, Jing Jiang, and Chengqi Zhang. 2018b. Bi- directional block self-attention for fast and memory-efficient sequence modeling. arXiv preprint arXiv:1804.00857

  17. [24]

    Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pages 3104–3112

  18. [25]

    Zhaopeng Tu, Zhengdong Lu, Yang Liu, Xiaohua Liu, and Hang Li. 2016. Modeling cover- age for neural machine translation. arXiv preprint arXiv:1601.04811

  19. [26]

    Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems, pages 5998–6008

  20. [27]

    Mingxuan Wang, Jun Xie, Zhixing Tan, Jinsong Su, Deyi Xiong, and Chao Bian. 2018a. Neural machine translation with decoding history enhanced attention. In Proceedings of the 27th International Conference on Computational Linguistics, pages 1464–1473

  21. [28]

    Mingxuan Wang, Jun Xie, Zhixing Tan, Jinsong Su, et al. 2018b. Towards linear time neural machine translation with capsule networks. arXiv preprint arXiv:1811.00287

  22. [29]

    Baosong Yang, Zhaopeng Tu, Derek F Wong, Fandong Meng, Lidia S Chao, and Tong Zhang. 2018a. Modeling localness for self-attention networks. arXiv preprint arXiv:1810.10182

  23. [30]

    Min Yang, Wei Zhao, Jianbo Ye, Zeyang Lei, Zhou Zhao, and Soufei Zhang. 2018b. Inves- tigating capsule networks with dynamic routing for text classification. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3110–3119

  24. [31]

    Ningyu Zhang, Shumin Deng, Zhanlin Sun, Xi Chen, Wei Zhang, and Huajun Chen. 2018a. Attention-based capsule networks with dynamic routing for relation extraction. arXiv preprint arXiv:1812.11321

  25. [32]

    Zhirui Zhang, Shuangzhi Wu, Shujie Liu, Mu Li, Ming Zhou, and Enhong Chen. 2018b. Regularizing neural machine translation by target-bidirectional agreement. arXiv preprint arXiv:1808.04064

  26. [33]

    V oita, Elena and Talbot, David and Moiseev, Fedor and Sennrich, Rico and Titov, Ivan. 2019a. Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Pruned arXiv preprint arXiv:1905.09418 Improving Multi-Head Attention with Capsule Networks 13

  27. [34]

    Domhan, Tobias 2018b. How much attention do you need? a granular analysis of neural machine translation architectures Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1799–1808

Pith tools

Reviewed August 14, 2026 · model on record in the stance chip above.