Revisiting the Shape Convention of Transformer Language Models

Feng-Ting Liao, Guan-Ting Yi, Tzu-Quan Lin, Meng-Hsi Chen, Da-shan ShiuarXiv 2026

TL;DR

Hourglass Transformers challenge the long-standing "narrow-wide-narrow" convention of Transformer feed-forward networks by inverting them into a "wide-narrow-wide" bottleneck structure. This architectural shift allows models to utilize wider residual streams and fewer layers, resulting in an 8.7% training compute efficiency gain and up to a 1.93× speedup in token decoding with 50% less KV-cache memory for long contexts.

What Problem Does This Paper Address?

Since the inception of modern dense Transformers, the shape of the Feed-Forward Network (FFN) has remained remarkably rigid: a narrow-wide-narrow multilayer perceptron (MLP) that expands the model dimension ($d_{model}$) to a much wider intermediate dimension ($dh$) before projecting it back. Because FFNs consume the majority of a Transformer's non-embedding parameters, this design choice implicitly dictates how capacity is distributed across depth, width, and attention.

The authors question whether this standard convention is truly necessary. They explore whether an inverted "hourglass" FFN can break this rigid design space, allowing engineers to trade FFN intermediate width for a wider residual stream and fewer total layers without sacrificing model expressivity or performance.

Methods

The authors introduce Hourglass Transformers, which substitute standard Transformer components with two novel variants:

  1. Hourglass FFN: Replaces the single large narrow-wide-narrow FFN expansion with a residual stack of $K$ wide-narrow-wide sub-MLPs. Here, the intermediate bottleneck dimension is smaller than the model dimension ($dh < d_{model}$).
  2. Hourglass Attention: Widening $d_{model}$ normally causes attention computation to explode. To counter this, Hourglass Attention projects the input embeddings to a lower dimension ($d_{attn} < d_{model}$) before performing sequence mixing, keeping attention compute costs matched to conventional baselines.

Together, these components decouple the residual stream width from the attention and FFN intermediate widths. This allows the architecture to operate with a much wider hidden state ($d_{model}$) and fewer total layers ($L$) under a fixed parameter budget.

Conventional vs Hourglass Transformer Block

Datasets

  • Pre-training & Validation: Models were trained using the Stage 1 pre-training corpus of OLMo-2 1B (ranging from 2.5B to 160B tokens depending on model scale). Validation was performed on Dolma Common Crawl, Dolma The Stack, M2D2, and WikiText.
  • Downstream Benchmarks: Evaluated on ARC-Easy, HellaSwag, PIQA, SciQ, CommonsenseQA, TriviaQA, and NaturalQS.
  • Long-Context Evaluation: Evaluated using Proof-pile and the RULER benchmark (which tests 13 complex long-context tasks including retrieval, aggregation, and variable tracking).

Key Insights and Ideas

  • The Depth-Width Trade-Off Rebalanced: Stacking deeper, narrower bottleneck sub-blocks within the FFN frees up parameter budget. Instead of spending these parameters on adding more Transformer layers (where returns diminish rapidly and latency increases linearly), they are better spent widening the hidden representation ($d_{model}$).
  • Alleviating the LM Head Bottleneck: A wider model dimension ($d_{model}$) provides a higher-dimensional pathway for gradients flowing back from the language modeling head, acting as a better function approximator during training.
Figure 2: Frozen LM head Experiment at 403M. The experiment probes the bene- fit of a larger dmodel: the Hourglass model achieves the lowest loss, and the wider con- ventional variant outperforms the standard one, consistent with the gradient bottle- neck hypothesis [Godey and Artzi, 2026].
  • Fewer Layers Mean Massive Inference Savings: Because the hourglass design achieves comparable quality with fewer total layers, it inherently slashes the number of attention layers. This directly translates to a massive reduction in KV-cache memory footprint and significantly faster token decoding during inference.

Key Results

  • Training Compute Efficiency: Across 906M, 3B, and 8B scales, Hourglass Transformers achieved an 8.7% improvement in training compute efficiency at matched average downstream accuracy compared to standard Transformer baselines.
Average Downstream Accuracy vs. Estimated Training Compute
  • Inference Speedups: At a 64k context length, the reduced layer count of the 906M Hourglass model yielded a 1.93× faster token decoding speed and 50% lower KV-cache memory requirements. The 3B and 8B models demonstrated 1.52× and 1.43× decoding speedups, respectively.
  • Long-Context Superiority: Following YaRN long-context extension up to 64k tokens, the 8B Hourglass model consistently outperformed the conventional baseline in both perplexity (Proof-pile) and accuracy (RULER) at every evaluated context length.

Limitations and Future Work

  • Scale and Token Budgets: The complete recipe was validated up to an 8B parameter scale trained on 160B tokens. Testing on trillion-token budgets is required to fully verify the architecture's scaling laws.
  • Factor Decomposition: Because FFN shape, residual width, layer count, and attention width were optimized jointly, a granular, isolated factor decomposition of each design axis remains an open area for study.
  • Sequence Mixer Interactions: All models were trained using standard multi-head attention. While the authors verified that alternative sequence mixers like Group-Query Attention (GQA) and Multi-head Latent Attention (MLA) preserve inference advantages, how they interact with Hourglass FFNs during training remains unexplored.

Summary updated

BibTeX
@misc{liao2026revisiting,
  author = {Feng-Ting Liao and Guan-Ting Yi and Tzu-Quan Lin and Meng-Hsi Chen and Da-shan Shiu},
  title = {{Revisiting the Shape Convention of Transformer Language Models}},
  year = {2026},
  eprint = {2602.06471},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.06471},
}
Figure