All-Attention Transformer: Architectural Innovation or Hype?

The All-Attention Transformer aims to replace FFN and other components with pure attention, but faces efficiency and stability challenges and lacks empirical evidence.
This article explores the "All-Attention Transformer" concept proposed on Hacker News—a Transformer variant based entirely on attention mechanisms, removing components such as feed-forward networks (FFN). It analyzes potential advantages such as architectural unification, reduced parameters, and theoretical elegance, and notes that attention itself possesses universal approximation capability. However, the design faces three challenges: the computational efficiency paradox (quadratic attention complexity vs. linear FFN complexity), training stability issues (requiring redesigned normalization and initialization), and lack of empirical support. Since the Hacker News post has low traction (4 points, zero comments) and there is no paper or code, it should currently be regarded as a conceptual hypothesis. The conclusion recommends cautious optimism, awaiting open-source implementations or papers, with focus on performance on long-sequence tasks and parameter efficiency.
Introduction
A post titled "All-Attention Transformer" has sparked discussion on Hacker News. Although it hasn't gained much traction (only 4 points and no comments yet), its title hints at a design approach that could overturn the existing Transformer architecture—one based entirely on attention mechanisms, completely abandoning feed-forward networks (FFN), residual connections, or other components. This article analyzes the potential value and challenges of this concept from a technical perspective.
What Is an All-Attention Transformer?
A traditional Transformer layer consists of alternating multi-head self-attention (MHA) and feed-forward networks (FFN), supplemented by residual connections and layer normalization. An "All-Attention Transformer," taken literally, means that each layer contains only attention operations—possibly even using attention to replace the function of the FFN.
This design is not without precedent. In recent years, researchers have attempted to use attention mechanisms to implement the key-value memory function of FFNs (as in follow-up work to Google's "Attention is All You Need"), or to simplify the architecture through Gated Attention Units (GAU). An all-attention architecture could further advance this trend, making models more unified and easier to parallelize.
Feed-Forward Network (FFN) is the fully connected sublayer that follows multi-head self-attention in a Transformer layer. It typically consists of two linear transformations and a non-linear activation function (such as ReLU or GELU), applying the same transformation independently to each position. FFN parameters usually account for about two-thirds of the entire model, and their role is to provide non-linear feature transformation and memory capacity. Some recent studies have attempted to replace FFNs with key-value memory or gating mechanisms—for example, Google's Gated Attention Unit (GAU) combines attention with a gated linear unit, reducing parameter count and improving training efficiency, which provides a practical foundation for all-attention designs.
Potential Advantages: Simplicity and Theoretical Elegance
If an all-attention design proves feasible, its greatest advantage lies in architectural unification. In current Transformers, the FFN accounts for a large number of parameters (typically 2-4 times that of attention). Removing the FFN could significantly reduce parameter count while avoiding the non-linear bottleneck introduced by the FFN. Moreover, a pure attention model is closer to the general computational paradigm of "retrieve-and-aggregate," potentially improving long-range dependency modeling.
From a theoretical standpoint, attention itself possesses universal approximation capability (as demonstrated by work such as Set Transformer), so an all-attention architecture may not be inferior in expressiveness. However, it should be noted that the position-wise non-linear transformation provided by the FFN is key to current model performance, and removing it entirely could harm the diversity of feature extraction.
Universal approximation capability refers to the ability of a neural network to approximate any continuous function given sufficient width or depth. Work such as Set Transformer has demonstrated that attention-based models possess permutation invariance and universal approximation properties—that is, pure attention architectures can theoretically represent complex functions. However, universal approximation does not guarantee training feasibility or sample efficiency; actual performance also depends on the optimization landscape, data volume, and inductive bias. The position-wise non-linear transformation provided by the FFN is regarded as a key inductive bias that enhances the model's ability to extract local features, and removing it entirely could affect generalization in low-resource scenarios.
Technical Challenges and Open Questions
The Computational Efficiency Paradox
Attention complexity grows quadratically with sequence length, whereas the FFN is linear in complexity. If an all-attention model needs to stack more layers to compensate for the absence of the FFN, training and inference costs could increase rather than decrease. This contradiction is particularly pronounced in high-resolution image or long-text scenarios.
Quadratic complexity refers to the fact that the computational cost of self-attention grows quadratically with sequence length, because each position needs to compute attention weights with all other positions. In contrast, the FFN computes independently for each position, with linear complexity. If an all-attention model attempts to replace the FFN with attention, it may need to stack more layers to compensate for the missing non-linear transformation, further amplifying computational cost. This is especially true in long-sequence tasks (such as document-level machine translation or high-resolution images), where quadratic complexity becomes a bottleneck unless approximation methods such as sparse attention, linear attention, or block-wise computation are adopted—but these methods may sacrifice model expressiveness.
Training Stability
The residual connections and layer normalization of the FFN are crucial for training stability. A pure attention architecture requires redesigned normalization strategies and initialization schemes; otherwise, gradient vanishing or explosion can easily occur. Currently, there are no public large-scale experiments validating its feasibility.
Residual connections mitigate the gradient vanishing problem in deep networks by adding the input directly to the output; layer normalization normalizes the features of each sample, stabilizing the activation distribution. Together, they enable Transformers to be trained with hundreds of layers. If the FFN is removed, the placement and form of residual connections and layer normalization need to be redesigned; otherwise, gradient propagation may be hindered. For example, a pure attention architecture may need normalization both before and after the attention sublayer, or more refined initialization schemes (such as Fixup initialization) to maintain training stability. There is currently a lack of large-scale experimental validation of the effectiveness of these strategies in all-attention models.
Lack of Empirical Support
The post received only 4 points and zero comments on Hacker News, indicating limited community interest. The original content provides no paper, code, or experimental data, so "All-Attention Transformer" currently resembles a conceptual hypothesis rather than a validated technical approach.
Community Reaction and Signal Interpretation
Hacker News's scoring mechanism typically reflects the immediate interest of the technical community. A score of 4 indicates that the post did not resonate widely. Possible reasons include: the title is too vague, there is a lack of substantive content for discussion, or the community is experiencing fatigue with "yet another Transformer variant." Zero comments means no technical debate formed, making it difficult to extract useful insights.
However, low traction does not mean the concept is without value. Many breakthrough works received little attention initially; what matters is whether rigorous implementation and evaluation follow.
Conclusion: Cautious Optimism, Awaiting Empirical Evidence
"All-Attention Transformer" points to an interesting direction of exploration: replacing the heterogeneous components of the Transformer with a unified attention mechanism. Its theoretical motivation is reasonable, but it faces three challenges: computational efficiency, training stability, and lack of empirical evidence. In the absence of public experiments, developers are advised to stay informed but avoid blindly following the trend. If open-source implementations or papers are published in the future, focus should be placed on their performance on long-sequence tasks and parameter efficiency.
For AI architecture researchers, this concept serves as a reminder: the modular design of the Transformer is not the end point, and continuous simplification and reconstruction remain worthwhile endeavors.
Related articles

Lean Language: Using Code to Verify Mathematical Proofs — The Key for AI to Crack the Riemann Hypothesis?
The Lean programming language makes mathematical proofs machine-verifiable. Adam Marblestone believes RLVR will drive AI to automatically search for proofs, potentially cracking the Riemann Hypothesis and enabling formally verified software and cybersecurity.

D20 Bench: Testing LLM Dungeon Master Skills with Code-Based Scoring
D20 Bench is an LLM benchmark on Hacker News that uses code-based scoring to test how well models follow D&D 5E rules as Dungeon Masters. We analyze its design, strengths, and limits.

Brazil Sends Google the Bill: Fake AI Doctors on YouTube Trigger Regulatory Storm
Brazil demands Google bear financial responsibility for fake AI doctor content on YouTube. This regulatory innovation could trigger global chain reactions. The article analyzes the background, impact on platform business models, and new trends in AI medical content governance.