NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Hyper-Connections

Defa Zhu, Hongzhi Huang, Zihao Huang, Yutao Zeng, Yunyao Mao, Banggu Wu, Qiyang Min, Xun Zhou

Introduction

Hyper-connections (HC) introduce a novel, learnable alternative to traditional residual connections that resolves the long-standing trade-off between gradient vanishing and representation collapse in deep neural networks. By allowing networks to dynamically adjust connection strengths and even rearrange layer orders on the fly, HC enables large language models to converge up to 1.8x faster while significantly boosting accuracy across both language and vision tasks.

What Problem Does This Paper Address?

Since the advent of ResNets, residual connections ($y = x + f(x)$) have been the "glue" of deep learning, enabling the training of incredibly deep architectures like Transformers. However, they come with a fundamental "seesaw effect" based on where you place the Layer Normalization:

  1. Pre-Norm: Excellent for gradient stability but prone to representation collapse, where deeper layers become highly similar and stop contributing new information.
  2. Post-Norm: Better at preserving distinct representations but notoriously difficult to train due to vanishing gradients.
Cosine similarity across layers showing Hyper-Connections mitigating representation collapse compared to Pre-Norm.

The core issue is that standard residual connections use fixed, non-trainable weights. The authors of this paper ask a simple but profound question: Can neural networks autonomously learn the optimal strength of these connections to get the best of both worlds?

Methods: Introducing Hyper-Connections

The authors introduce Hyper-Connections (HC), which replace the standard addition operation with a learnable matrix-based framework.

  • Expansion Rate ($n$): Instead of a single hidden state, the network maintains $n$ hidden vectors. This allows the model to reserve multiple "patterns" of information flow simultaneously.
  • Depth and Width Connections: HC decouples connections into two types:
  • Depth-connections: Learnable weights that integrate features vertically across different layers (a generalized version of residuals).
  • Width-connections: Lateral information exchange between the $n$ hidden vectors within the same layer.
  • Dynamic Hyper-Connections (DHC): In this "smart" version, connection weights aren't just learned parameters; they are predicted dynamically based on the input token itself.
  • Sequential-Parallel Duality: Mathematically, the authors prove that by changing the HC weight matrix, the network can effectively switch between arranging layers sequentially, in parallel, or in a "soft mixture" of both.

Crucially, the authors provide an initialization strategy that makes HC behave like a standard Pre-Norm Transformer at the start of training, ensuring the model remains stable while it begins learning its optimal internal wiring.

Key Insights and Ideas

  • The $\Lambda$-Shaped Pattern: Through visualization, the authors discovered that HC learns a unique "$\Lambda$-shaped" connection pattern. It combines a Post-Norm style (long-term decay) with a Pre-Norm style (frequent access to early layers), effectively breaking the seesaw trade-off.
  • Dynamic Reconfiguration: DHC allows the model to "re-architect" itself for every token. For some tokens, it might process layers more in parallel; for others, more sequentially.
  • Efficiency is Key: Expanding the hidden state $n$ times might sound computationally expensive, but the parameter and FLOP overhead is surprisingly negligible (often <0.2%). The main cost is a slight increase in activation memory.
  • Parallelism Discovery: The model naturally learns to treat certain layers (like Attention and FFN) as parallel blocks, similar to specialized architectures like the Parallel Transformer, but it does so autonomously.

Key Results

The researchers validated Hyper-Connections across a massive range of benchmarks, including LLM pre-training (dolma-v1.5-sample, OLMoE-MIX), language evaluation (ARC-Challenge, HellaSwag, MMLU), and vision tasks (ImageNet-1k via ViT and DiT). The performance gains are substantial across the board:

Training loss, validation loss, and downstream accuracy curves demonstrating the 1.8x convergence speedup and performance gains of DHCx4.
  • Convergence Speed: On the OLMoE-1B-7B model, the version with Hyper-Connections (DHCx4) converged 1.8x faster than the baseline.
  • Language Accuracy: The 7B MoE model saw a 6-point jump on ARC-Challenge and a 1.2-point improvement on MMLU.
  • Vision Performance: For ViT-Large on ImageNet, HC improved top-1 accuracy from 77.25% to 79.94%—a significant margin in image classification.
  • Stability: HC models exhibited fewer "loss spikes" during training compared to standard residual baselines, suggesting a more robust optimization landscape.

Limitations and Future Work

  • Memory Footprint: The primary drawback is an increase in activation memory (ranging from 10% to 28% in their tests) because the model must store $n$ hidden states to perform backpropagation.
  • Scaling Laws: While tested up to 7B parameters, the behavior of HC at the "frontier" scale (70B+ or 400B+) remains to be seen.
  • Optimal $n$: The authors found diminishing returns when increasing the expansion rate $n$ beyond 4. Future work could investigate if more complex "width" architectures could utilize higher expansion rates more effectively.

Overall, Hyper-Connections represent a promising shift from "fixed-pipe" architectures to "fluid-flow" networks that can optimize their own internal connectivity.

Summary updated

BibTeX
@inproceedings{zhu2025hyper,
  author = {Defa Zhu and Hongzhi Huang and Zihao Huang and Yutao Zeng and Yunyao Mao and Banggu Wu and Qiyang Min and Xun Zhou},
  title = {{Hyper-Connections}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
}
Figure