response
Dear EUoZ,
Thank you for your insightful review and the time you have invested in providing your valuable feedback on our paper. We appreciate your careful reading and have addressed each of your comments as follows:
**Q1: The grad norm of Pre-LN and how to reproduce Fig 2(a).**
Our theoretical study is consistent with the findings of previous works, wherein the main conclusion is that Pre-LN Transformer networks do not suffer from the gradient vanishing issue. Regarding the implementation, it is entirely based on FairSeq. To facilitate reproduction, we have updated a notebook in our anonymous repository to generate the grad norm for each layer, which can be found at https://anonymous.4open.science/r/residual_review-6F08/notebooks/vis_grad.ipynb. We have also executed the command you provided, which relies on the huggingface transformers library, and observed no gradient vanishing issue. The variations in the curve as compared to the FairSeq curve may be attributed to implementation details, which we are eager to investigate further.
**Q2: The derivations of theorem 3.1 ignore the impact of non-linearity on the gradient of the transformer MLP layer, instead assuming it to be a single FC.**
First, Theorem 3.1 is to illustrate the gradient norm scale across layers in a pre/post-norm transformer, and the MLP with or without ReLU activation in between does not change conclusion at all because of the piece-wise linear property of ReLU and statistical concentration property of randomly initialized weights. Second, the analysis of the forward and backward processes through ReLU activation is straightforward and readily available in many previous literature (Allen-Zhu & Li 2019 “A convergence theory for deep learning via over-parameterization”, Xiong et al.2020 “On layer normalization in the transformer architecture” and many others). Given such circumstances, we choose to present the result in a concise way without too many sub/super scripts, where we use a simple MLP layer. We have revised the paper with these points clearly stated.
**Q3: The derivation also ignores back-propagated gradient through the Query.**
In our setup, we initialize $W_Q$ to be zero matrices. When doing back-propagation, there is no backward signal on the $xW_K$ branch because of $W_Q=0$. We can compute the gradient on $W_Q$ matrix but there is no backpropagated signal through the $W_Q$ matrix. Hence, our proof and the claim in Theorem 3.1 are flawless as we denote the block k’s parameters to be $w_k$ which includes the MLP layer weights and query matrix. Nonetheless, we will add a note to avoid future misunderstanding.
**Q4: Statistical significance test.**
For baseline model (i.e., B2T), we use the checkpoint they provided on the original authors’ GitHub and generated the output for WMT2010 to WMT2016. We then used Moses tool (https://github.com/moses-smt/mosesdecoder/blob/master/scripts/analysis/bootstrap-hypothesis-difference-significance.pl) to compute the significance value (P-value). The output is:
Assuming that essentially the same system generated the two hypothesis translations (null-hypothesis), the probability of actually getting them (p-value) is: 0.001.
Therefore, the null hypothesis, i.e., our system is the same as baseline, should be rejected (p<0.001). In another word, our improvement is statistically significant.
**Q5: More discussion about previous work is missing.**
We appreciate your feedback on this point. In the first section, we have categorized previous works into three groups: modifying architecture, weights, and initialization. However, if there are additional aspects of previous work that need further discussion, we would be grateful if you could provide more details.
**Q6: Adam condition number and values of gradient.**
Regarding Adam, we focused on the vanished gradings in early layers. We have detailed the changes in the $\kappa$ value in the notebook. If a model wider than 1024 (e.g. 4096) or a learning rate larger than 1e-4 (e.g., 5e-4) is used, the $\kappa$ value will be even larger.
**Q7: How hyper parameters are selected.**
One of the advantages of our proposed method is that it does not introduce any new hyper-parameters. The learning rate and dropout are standard settings on these tasks, which can be found in the library tutorial or baseline implementation (e.g., https://github.com/facebookresearch/fairseq/tree/main/examples/translation#iwslt14-german-to-english-transformer or https://github.com/takase/b2t_connection#training). We will provide further clarification on our choice of these specific hyperparameters in the revised version.
**Q8: Typos**
We appreciate you bringing the typographical errors to our attention. We will revise the draft to correct them.
We are grateful for your insightful comments and look forward to revising our paper according to your suggestions. We believe that your feedback will significantly improve the quality of our work.
Best regards,