‹ 返回 2026-07-21

xHC:扩展的超连接

xHC: Expanded Hyper-Connections

▲ 44 💬 1 2026-07-21

Xiangdong Zhang, Xiaohan Qin, Sunan Zou, Tuo Dai, Xiaoming Shi, Huaijin Wu, Yebin Yang, Zhuo Xia, Shaofeng Zhang, Lin Yao, Yuliang Liu, Yu Cheng, Junchi Yan

摘要

超连接技术将Transformer的残差流扩展为N个并行流,从而提供了一种超越模型宽度和深度的内存扩展方式。受限流超连接则能够稳定这种扩展机制。从N=1到N=4所带来的巨大性能提升表明,残差流扩展是一种有前景的扩展策略。不过,现有的超连接方法通常只扩展到N=4。我们的实验揭示了原因:当继续扩展mHC时,性能提升效果会减弱,而训练成本则会迅速上升。我们认为这种限制源于两个问题:随着流的数量增加,用于回写的信息不足;此外,残差混合生成过程的成本与N的立方成正比。为了解决这两个问题,我们提出了xHC——这是第一个能够实现N>4时有效扩展的超连接方法。xHC结合了时间特征增强技术以提供更丰富的回写信息,同时采用稀疏残差流架构,仅更新N=16中的k=4个流,同时仍能完全访问所有残差状态。在18B和28B MoE模型中,xHC带来了显著的性能提升。在18B MoE模型中,xHC比mHC提升了4.0分的平均下游得分,而训练成本却只增加了少量。根据缩放定律,普通方法和mHC分别需要xHC的1.50倍和1.19倍的计算资源才能达到相同的损失值。实际的大规模训练还需要控制来自扩展残差状态的记忆开销。因此,我们引入了xHC-Flash技术,它将每个子层的记忆开销从73.5C降低到40C,这一数值与N=4时mHC所需的34C相当,同时仍保留了完整xHC带来的优势。总的来说,xHC和xHC-Flash使得大规模残差流扩展在LLM预训练中变得可行且有效。

English Abstract

Hyper-Connections (HC) expand the residual stream of Transformers into N parallel streams, providing a form of memory scaling beyond model width and depth. Manifold-Constrained HC (mHC) stabilizes this formulation at scale. The large gains from N{=}1 to N{=}4 suggest residual-stream expansion as a promising scaling axis. However, existing HC-family methods typically stop at N{=}4. Our experiments reveal why: scaling mHC beyond this point yields diminishing performance gains and rapidly increasing training cost. We attribute this limitation to two bottlenecks: insufficient write-back information for an expanding number of streams and residual-mixing generation whose cost scales cubically with N. To address both bottlenecks, we propose xHC (Expanded Hyper-Connections), the first HC-family method to achieve meaningful expansion beyond N{=}4. xHC combines temporal feature augmentation for richer write-back with a sparse residual-stream architecture that updates only k=4 of the N=16 streams while retaining dense access to the full residual state. Across 18B and 28B MoE models, xHC delivers strong and consistent downstream improvements. On an 18B MoE model, xHC improves the average downstream score by 4.0 points over mHC, while adding only modest training FLOPs over the vanilla baseline. Scaling-law experiments show that the vanilla and mHC require 1.50times and 1.19times the compute of xHC, respectively, to reach the same loss. Practical large-N training also requires controlling memory traffic from the expanded residual state. We therefore introduce xHC-Flash, which reduces the per-sublayer memory traffic from 73.5C to 40C, comparable to the 34C required by mHC at N{=}4, while retaining the gains of full xHC. Together, xHC and xHC-Flash make large-N residual-stream expansion effective and practical for LLM pre-training.