PAPER: IntroductionGating mechanism is well-established in neural networks. Early architectures, such as LSTMs [1], Highway Networks [2] and GRUs [9], pioneer the use of gating to control information flow across time steps or layers and improve gradient propagation. This principle persists in modern architectures. Recent sequence modeling works, including state-space models [3,10] and attention mechanisms [11,12,13,4,14,15,16,17,18,5,6] commonly apply gating, often to modulate the outputs of tokenmixer components. Despite its widespread adoption and empirical success, most recent works do not look into the gating mechanisms like the gating scores and their effect on the model's hidden states.Insufficient understanding hinders assessing gating's true contribution, especially when confounded with other architectural factors. For instance, while Switch Heads [19,20] introduces a sigmoid gating to select top-K attention head experts, our experiments reveal an interesting finding (Appendix A.1): substantial performance gains persist even when reduced to a single expert, where the gate simply modulates the value output. This strongly suggests the gating itself provides significant intrinsic value, separate from the routing mechanism. Similarly, in Native Sparse Attention (NSA) [21], while overall performance improvements are demonstrated, they do not disentangle the contributions of its gating mechanism from the effects of the sparse attention design itself. These considerations underscore the need to rigorously disentangle the effects of gating from other architectural components. Performance comparison (Test PPL and MMLU) of 15B MoE models with gating applied at various positions. Gating after SDPA (G1) yields the best overall results. Gating after the Value layer (G2) also demonstrates notable improvements, particularly in PPL. Right: Training loss comparison (smoothed, 0.9 coeff.) over 3T tokens between baseline and SDPA-gated 1.7B dense models under identical hyperparameters. Gating results in lower final loss and substantially enhanced training stability, mitigating loss spikes. This stability allows for potentially higher learning rates and facilitates better scaling.In this work, we investigate gating mechanisms in the standard softmax attention [22] (Sec.2.2). Specifically, we introduce gating at distinct positions (Fig. 1): after the query (G 4 ), key (G 3 ), and value projections (G 2 ); following the Scaled Dot Product Attention (SDPA) outputs (G 1 ); and after the final dense output layer (G 5 ). Our exploration covers gating variants including elementwise and headwise, head-specific and head-shared, as well as additive and multiplicative forms. We find that: (i) applying SDPA output head-specific gating (G 1 ) yields the most significant performance improvements (e.g., up to 0.2 PPL reduction and 2 points on MMLU); (ii) the SDPA output gating also improves training stability, nearly eliminating loss spikes, enabling larger learning rates and enhancing model scalability.We identify two factors contributing to the efficacy of gating: (i) Non-Linearity. The two consecutive linear layers -the value (W v ) and dense (W O ) projections -can be rewritten into one low-rank linear projection. Therefore, introducing non-linearity through gating at positions G 1 or G 2 can increase the expressiveness of this low-rank linear transformation (Sec. 4.1). (ii) Sparsity. Although non-linear gating variants consistently enhance performance, we observe that their gains vary. Our analysis further reveals that the pronounced sparsity of the gating scores is another crucial factor, introducing input-dependent sparsity to SDPA outputs (Sec. 4.2). Sparse alse gating eliminates the massive activation [7] and attention sink [8]: the initial tokens have large activation values in the corresponding hidden states (Tab. 4) and disproportionately dominate attention scores (Fig. 2, Sec. 4.3). Previous work [8,7,23] explains attention sinks as an accumulation of redundant attention due to non-negative softmax normalization. Empirically, we verify that when query-dependent sparse gating is applied at the SDPA output, both our dense and MoE models (trained on 3.5T tokens) exhibit no attention sink. Furthermore, these models demonstrate superior performance in length generalization, achieving a gain of over 10 points on RULER [24](Sec.4.4).Practical Recommendation. For best results, apply elementwise SDPA gating G 1 (i.e., gating after the attention-weighted value projection) and train with a moderately increased learning rate.2 Gated-Attention Layer
================================================================================

REVIEW
--------------------------------------------------------------------------------
# Peer Review

## Summary Of The Paper

The paper presents a comprehensive empirical and analytical study of gating mechanisms in the softmax attention layer of transformer models. It explores the placement, granularity, and types of gating (multiplicative/additive, head-specific/shared, sigmoid/SiLU) and evaluates their impact on model performance, training stability, and attention dynamics. The authors argue that placing gating after the Scaled Dot Product Attention (SDPA) output (G1) yields the greatest improvements—such as a 0.2 PPL reduction and 2-point MMLU boost—and enhances training stability by reducing loss spikes. Two key factors are identified: (1) introducing non-linearity to the low-rank mapping formed by the value and output projections, and (2) inducing input-dependent sparsity in SDPA outputs, which mitigates attention sink and massive activation effects. The paper concludes with practical recommendations for implementing SDPA output gating with moderate learning rate adjustments.

---

## Strengths

- **Comprehensive Exploration**: The paper thoroughly examines multiple dimensions of gating—position (G1–G5), granularity (elementwise/headwise), and activation functions (sigmoid/SiLU)—and provides a rich comparative evaluation across dense and MoE models.
- **Empirical Evidence for Attention Sink Mitigation**: The authors empirically demonstrate that SDPA output gating with head-specific sigmoid gates significantly reduces attention sink (e.g., attention allocation to the first token drops from 46.7% to 4.8%) and massive activation effects, as evidenced by Table 4 and Figures 2–3.
- **Insightful Theoretical Contributions**: The paper offers a theoretical rationale for the effectiveness of gating by showing how it breaks the low-rank structure imposed by the sequential value and output projections (Equations 6–8), and how it introduces input-dependent sparsity that helps alleviate attention sink.
- **Practical Recommendations**: The authors provide actionable advice for practitioners, such as applying SDPA output gating with head-specific sigmoid and adjusting learning rates accordingly.

---

## Weaknesses

### Major Concerns

- **Lack of Statistical Significance Testing**: The paper reports performance improvements (e.g., 0.2 PPL reduction, 2-point MMLU gain) without accompanying error bars, confidence intervals, or p-values. Without such measures, it is impossible to assess whether these differences are statistically meaningful. For example, in Table 1, the difference between the baseline and G1 is claimed to be significant, but no statistical test supports this assertion.
- **Ambiguous Hyperparameter Choices**: The paper does not justify the selected hyperparameters (learning rates, batch sizes) in a systematic way. For instance, in Table 2, the learning rate is increased from 4e-3 to 4.5e-3 for the 3.5T token setup, but the rationale for this change is unclear. There is also no ablation study to determine the sensitivity of results to these choices.
- **Overgeneralization of Findings**: The paper makes broad claims about the universality of SDPA output gating (e.g., “best results” across all setups), but the supporting evidence comes from a limited set of experiments on dense and MoE models. Generalizability to other tasks (vision, reinforcement learning) or architectures is not assessed.

### Minor Concerns

- **Limited Comparison to Prior Work**: While the paper references several studies on attention sinks and sparse attention, it does not directly compare its results to prior approaches (e.g., explicit top-k sparse attention [51]), which inherently avoid attention sink. This weakens the novelty argument.
- **Incomplete Explanation of Sparsity Effects**: The paper argues that input-dependent sparsity is essential for eliminating attention sink, but Table 4 shows that even input-independent gating reduces attention sink somewhat. This raises questions about the necessity of input dependence.
- **Reproducibility Issues**: The paper promises to release code and models but does not provide links or specific instructions for doing so. This violates reproducibility standards expected in top-tier conferences.

---

## Questions For The Authors

1. **Statistical Validity**: How did the authors ensure that the reported performance improvements (e.g., 0.2 PPL reduction) are statistically significant? Were multiple training runs conducted, and were confidence intervals or p-values computed?

2. **Hyperparameter Sensitivity**: What criteria were used to choose the learning rates and batch sizes for different experimental setups (e.g., 4e-3 vs. 4.5e-3 for 3.5T tokens)? Is there an ablation study evaluating the sensitivity of results to these choices?

3. **Comparison to Explicit Sparse Methods**: Why wasn't the paper's SDPA output gating compared to prior work on explicit top-k sparse attention (e.g., [51]) that avoids attention sink entirely? How does the performance of the proposed method stack up against such alternatives?

4. **Input Dependence of Sparsity**: Table 4 shows that input-independent gating (row 6) still reduces attention sink compared to the baseline. How does this reconcile with the claim that input-dependent sparsity is essential for eliminating attention sink?

5. **Reproducibility Details**: Where can readers access the code and models described in the paper? Are there specific instructions for reproducing the results, including software environments, data sources, and training schedules?

---

## Limitations Not Addressed By The Authors

- **Lack of Theoretical Justification for Sparsity Benefits**: While the paper discusses the empirical benefits of input-dependent sparsity, it does not theoretically justify why this kind of sparsity specifically mitigates attention sink. A derivation linking sparsity patterns to attention sink behavior would strengthen the argument.
- **Neglect of Downstream Task Impact**: The paper focuses exclusively on language modeling benchmarks (PPL, MMLU). It does not investigate how the proposed gating mechanism affects performance in other domains, such as computer vision or reinforcement learning.
- **Unaddressed Trade-offs**: The paper omits a discussion of potential trade-offs of using gating, such as increased computational overhead or inference latency. Understanding these costs is crucial for real-world deployment.
- **Ethical and Societal Considerations**: While the paper briefly mentions broader impacts, it does not elaborate on potential ethical concerns (e.g., bias amplification, misuse of models) or safeguarding mechanisms for deployed systems.

---

## Soundness

**Rating: 3 (Good)**  
While the paper presents compelling empirical results and insightful theoretical arguments, the absence of statistical significance testing and insufficient justification for hyperparameter choices undermines the soundness of the conclusions. The experiments are well-conducted but lack the rigor required to confirm the robustness of the findings.

---

## Contribution

**Rating: 3 (Good)**  
The paper makes a valuable contribution by systematically exploring the role of gating in attention mechanisms and identifying SDPA output gating as a powerful technique for improving performance and training stability. However, the novelty is partially diluted by the lack of direct comparisons to existing methods and the omission of a theoretical grounding for the sparsity-related benefits.

---

## Confidence

**Rating: 4 (High Confidence)**  
Despite the noted shortcomings, the paper is well-written, logically organized, and presents a coherent narrative backed by solid empirical results. The technical claims are plausible, and the proposed method shows tangible benefits in practice.

---

## Rating

**Rating: 8 (Accept)**  
The paper deserves acceptance due to its novel insights, thorough empirical evaluation, and practical relevance. However, the lack of statistical rigor and incomplete justifications weaken the strength of the contribution. Future revisions should address these issues to elevate the paper to the highest standards of top-tier ML conferences.

---

## Brief Justification For Rating

The paper makes a timely and impactful contribution to the field of attention mechanisms in transformers by investigating the role of gating in improving performance and training stability. Its empirical results are convincing, and the theoretical insights into non-linearity and sparsity are thought-provoking. However, the absence of statistical significance analyses and inadequate justification for hyperparameter choices limits the persuasiveness of the claims. Despite these flaws, the work is sufficiently strong and novel to warrant acceptance.

================================================================================
