cmHC: Balancing Stream Mixing in Hyper-Connections via Geometric Contraction
AuthorsHaowei He, Ziwen Zhao, Chenshuo Pan, Gang Lin, Zhihao Yang, Chao Wang, Xinzhang Liu, Kaidong Yu, Han Gao, Dongfang Li, Menglin Yang, Shuangyong Song, Yongxiang Li
AffiliationsXingchen AGI Lab, China Telecom · The Hong Kong University of Science and Technology (Guangzhou) · Harbin Institute of Technology (Shenzhen) · Huawei Technologies Co., Ltd
cmHC keeps transformer residual streams mixing in a useful balance, aiming to improve large-scale training while reducing execution latency.
Key results
Used for the strongest nanoGPT configuration, with contraction applied to the first 2 layers.
Number of initial layers contracted in the strongest nanoGPT configuration.
nanoGPT-S improvement over mHC-lite.
DeepSeek-style mixture-of-experts model.
cmHC loss improvement over mHC at step 2k.
Maximum reduction in fused hyper-connection execution latency on Huawei Ascend 910C.
What the paper found
cmHC addresses a weakness in manifold-constrained Hyper-Connections: stream mixing can be too weak, leaving streams nearly independent, or too strong, making them indistinguishable. It contracts the Birkhoff polytope toward its interior by smoothing permutation matrices, while preserving exact double stochasticity and adding no learnable parameters. Because repeated contraction can drive streams toward uniform mixing, the method applies a moderate contraction mainly in early layers; the strongest nanoGPT configuration used λ = 0.97 in the first 2 layers. Experiments on OpenWebText and FineWeb-Edu found that this setup lowered OpenWebText validation loss by 0.0073 versus mHC-lite on nanoGPT-S. Tests also covered DeepSeek-style 6B and 300B mixture-of-experts models: on the 300B model, cmHC achieved a 0.0157 lower loss than mHC at step 2k. For deployment, fused operators on Huawei Ascend 910C reduced hyper-connection execution latency by up to 44.8%; the smaller-scale training experiments used NVIDIA H100 GPUs.
Original abstract
Manifold-constrained Hyper-Connections (mHC) extends residual connections to multiple streams and stabilizes residual propagation by constraining stream-mixing residual matrices to the Birkhoff polytope, the set of doubly stochastic matrices. In this work, we investigate how to effectively mix residual streams within the Birkhoff polytope. We reveal a mixing trade-off: when under-mixed residual matrices stay close to the vertices of the Birkhoff polytope, hyper-connections will degenerate into a set of nearly independent streams; when over-mixed residual matrices are concentrated around the uniform barycenter of the polytope, streams will become less distinguishable from each other. We theoretically validate our findings by bounding the cumulative residual mixing, stream difference and gradient difference of mixing coefficients across layers. Motivated by these findings, we propose Contraction for Manifold-Constrained Hyper-Connections (cmHC), an exact doubly stochastic method which geometrically contracts the Birkhoff polytope toward its interior. This contraction mitigates under-mixing by forcing the residual matrices to explore deeper into the polytope, with a provable stream mixing bound and no new parameterization. Moreover, we apply a moderate contraction at the shallow layers to prevent over-mixing, enabling stable gradient propagation on extremely large-scale model pretraining. Extensive experiments across dense and mixture-of-experts models at various parameter scales demonstrate the effectiveness and scalability of cmHC. We also develop fused operators for cmHC on Ascend NPUs, reducing hyper-connection execution latency by up to 44.8%.
Read the original paperMore in Transformers
Browse all 54 papers →Multi-Branch Transformer
Gaotang Li, Lingjie Chen, Chunyuan Deng, Zhiwei Xu, Hongzheng Chen, Christopher De Sa, Jingrui He, Yingheng Wang, Hanghang Tong
A Transformer architecture that branches into parallel blocks aims to improve language-model quality while making long-context decoding faster and more memory-efficient.
TPHC: Improving Hyper-Connections with Tensor-Parallel Grouped Updates
Xinying Hu, You Wu, Haoyi Wu, Jianchao Tan, Kefeng Zhang, Yuchen Xie, Kewei Tu
TPHC lets Transformer residual streams learn more distinct updates by coordinating them with tensor-parallel shards, improving language-model results with modest extra training time.
Hierarchical Residuals: A Minimalist Decoupling of Residual Width from Compute Width
Ziteng Wang, Jianqiao Lu, Xinyu Ma, Jintao Zhang, Jun Zhu, Yiyuan Ma, Jianfei Chen
HiRes gives Transformers a wider memory path between blocks without making each layer more computationally expensive.