HyperAIHyperAI

Command Palette

Search for a command to run...

cmHC:幾何的縮小によるハイパーコネクションにおけるストリーム混合の均衡化

概要

多様体制約付きハイパーコネクション(mHC)は、残差接続を複数のストリームへ拡張し、ストリーム混合残差行列を二重確率行列の集合であるバーコフ多面体に制約することで残差伝播を安定化する。本研究では、バーコフ多面体内で残差ストリームを効果的に混合する方法を検討する。我々は混合におけるトレードオフを明らかにする。すなわち、混合不足の残差行列がバーコフ多面体の頂点付近に留まる場合、ハイパーコネクションはほぼ独立したストリームの集合へと退化する。一方、過剰混合の残差行列が多面体の一様重心付近に集中する場合、ストリーム間の識別性が低下する。我々は、層をまたぐ累積残差混合、ストリーム差、および混合係数の勾配差を上界評価することにより、この知見を理論的に裏付ける。この知見に基づき、我々は多様体制約付きハイパーコネクションのための縮小手法(cmHC)を提案する。これは、バーコフ多面体をその内部へ向けて幾何学的に縮小する厳密な二重確率手法である。この縮小は、残差行列を多面体のより深部へ探索させることで混合不足を緩和し、証明可能なストリーム混合上界を持ち、新たなパラメータ化を必要としない。さらに、浅層では適度な縮小を適用して過剰混合を防ぎ、超大規模モデルの事前学習において安定した勾配伝播を可能にする。様々なパラメータ規模の密モデルおよび専門家混合モデルにわたる広範な実験により、cmHCの有効性とスケーラビリティが示される。また、Ascend NPU上でcmHC向けの融合演算子を開発し、ハイパーコネクションの実行遅延を最大44.8%削減した。

One-sentence Summary

Researchers from Xingchen AGI Lab, China Telecom, and collaborators propose cmHC, an exact doubly stochastic method that geometrically contracts the Birkhoff polytope toward its interior to balance residual stream mixing in hyper-connections, mitigating under-mixing while preventing over-mixing at shallow layers for stable large-scale pretraining across dense and mixture-of-experts models, with Ascend NPU fused operators reducing hyper-connection execution latency by up to 44.8%.

Key Contributions

  • The paper identifies and theoretically characterizes a mixing trade-off in manifold-constrained hyper-connections: residual matrices near Birkhoff polytope vertices cause under-mixing and nearly independent streams, while concentration around the uniform barycenter causes over-mixing and reduced stream distinguishability. It provides bounds on cumulative residual mixing, stream difference, and gradient difference across layers.
  • The paper introduces Contraction for Manifold-Constrained Hyper-Connections (cmHC), an exactly doubly stochastic method that geometrically contracts the Birkhoff polytope toward its interior by replacing permutation matrices with smoothed ones. This applies moderate contraction at shallow layers to avoid over-mixing, guarantees positive stream mixing, and requires no new parameterization.
  • The paper validates the method on GPT-2 and mixture-of-experts models at 6B and 300B parameter scales, showing improved training loss and stable gradient propagation. It also develops fused Ascend NPU operators that reduce hyper-connection execution latency by up to 44.8%.

Introduction

Hyper-connections extend residual connections by mixing multiple feature streams, and manifold-constrained variants stabilize deep network training by restricting mixing matrices to the Birkhoff polytope of doubly stochastic matrices. However, prior methods still face an information exchange trade-off: residual matrices can stay near permutation vertices, causing under-mixing and limited cross-stream interaction, while excessive mixing can make streams too similar and reduce their distinguishability. Existing parameterizations that explore the polytope interior often add complexity, lack a strict mixing guarantee, and are not validated on large-scale pretraining. The authors propose cmHC, which contracts the Birkhoff polytope by replacing permutation matrices with smoothed doubly stochastic matrices, guaranteeing positive mixing without introducing new parameters. They also apply moderate contraction only at shallow layers to balance early information exchange against over-mixing, and validate the approach from GPT-2 to 6B and 300B mixture-of-experts models.

Method

The authors leverage Hyper-Connections to maintain nnn feature streams xl∈Rn×dx_l \in \mathbb{R}^{n \times d}xl​∈Rn×d, updating them through residual mixing and Transformer branches. To ensure training stability, mHC-lite constrains the residual mixing matrix HlresH_l^{res}Hlres​ to the Birkhoff polytope by parameterizing it as a convex combination of permutation matrices PmP_mPm​. This guarantees exact double stochasticity.

However, this approach suffers from under-mixing. The residual matrix often remains close to a single permutation vertex, such as the identity, rather than learning active stream mixing. As illustrated in the framework diagram, the matrix stays near the vertex of the Birkhoff polytope, limiting cross-stream information exchange.

This under-mixing phenomenon is not specific to the identity matrix; it can occur around any permutation matrix favored at initialization. During training, the mixing coefficients α\alphaα remain close to their initial near-Dirac state, causing a single permutation to dominate the residual matrix and suppressing effective information exchange between streams.

To mitigate under-mixing, the authors introduce a geometric contraction method, cmHC. They replace each permutation matrix PmP_mPm​ with a smoothed version Pm′P_m'Pm′​ controlled by a contraction strength parameter λ∈(1/n,1)\lambda \in (1/n, 1)λ∈(1/n,1). This operation maps the original Birkhoff polytope to a smaller region in its relative interior, ensuring that every entry of the contracted residual matrix has a strictly positive lower bound. This guarantees a minimum level of cross-stream mixing without adding learnable parameters.

Nevertheless, a mixing trade-off exists. Stronger contraction promotes information exchange but risks over-mixing. By Banach's fixed-point theorem, repeated application of the contraction across layers causes the cumulative residual matrix to converge exponentially toward the uniform barycenter of the polytope.

This convergence indicates an over-mixing state where all output streams assign identical importance to every input stream. Furthermore, geometric contraction induces a butterfly effect that suppresses the norm of stream differences during inference, making feature streams less distinguishable.

The contraction also reduces the upper bound of the gradient difference between different permutation coefficients, leading to a smoother distribution of α\alphaα that further promotes excessive mixing.

To balance these effects, the authors propose a moderate contraction strategy applied only to the first KKK shallow layers. Since the mixing effect accumulates through products of residual matrices, contraction in shallow layers propagates its influence to all subsequent layers. This design improves the expressivity of the hyper-connection architecture by encouraging early stream interaction while avoiding the over-mixing risks associated with deep layer contraction.

Experiment

The experiments evaluate constrained mixing hyper-connections on OpenWebText and FineWeb-Edu using GPT-2 models and 6B to 300B mixture-of-experts models. Results show that moderate geometric contraction improves language modeling loss and training stability over residual and hyper-connection baselines, with shallow contraction proving more effective than deep contraction. Analyses further indicate that contraction suppresses inter-stream differences and smooths the learned mixing coefficients, supporting the over-mixing trade-off interpretation. Fused operators on Ascend NPUs also reduce hyper-connection training latency.

Across OpenWebText and FineWeb-Edu, cmHC with a moderate contraction coefficient and K=2 attains the best average loss rank among the compared methods. On OpenWebText, cmHC improves training and validation loss over mHC and mHC-lite at every nanoGPT scale, while maintaining gradient norms comparable to those baselines and much lower than unconstrained HC. Moderate contraction also consistently outperforms strong contraction on both datasets. cmHC with moderate contraction achieves the best average loss rank on both OpenWebText and FineWeb-Edu. On OpenWebText, cmHC reduces training and validation loss compared with mHC and mHC-lite at every model depth without adding learnable parameters. cmHC keeps gradient norms comparable to mHC and mHC-lite and substantially lower than unconstrained HC, indicating more stable optimization. Moderate contraction consistently beats strong contraction on both datasets, with the validation-loss advantage widening as depth increases.

Across OpenWebText evaluations with a fixed contraction coefficient of 0.97, shallow contraction generally yields lower training and validation losses than deep contraction across nanoGPT-S, nanoGPT-M, and nanoGPT-L. The deepest contraction setting is an exception on nanoGPT-M but substantially worsens validation loss on nanoGPT-S. Deep contraction also tends to produce higher gradient norms, suggesting less stable training. Shallow contraction achieves lower training and validation losses than deep contraction across most model sizes. Deep contraction is associated with higher gradient norms in the majority of cases, indicating less stable training. The deepest contraction setting is not robust, improving the medium model while substantially worsening the small model.

The fused cmHC operator pipeline consistently achieves lower total forward and backward latency than mHC across the tested hidden dimensions. The relative speedup is largest at the smallest hidden dimension and narrows as hidden dimension increases, reflecting reduced impact of launch and intermediate-memory overhead at larger sizes. Across all tested configurations, cmHC shows lower total latency than mHC. The speedup is largest at the smallest hidden dimension and decreases as the hidden dimension grows. The benefit is greatest where launch and intermediate-memory overhead form a larger share of execution time.

The experiments evaluate cmHC against mHC, mHC-lite, and unconstrained HC on OpenWebText and FineWeb-Edu across nanoGPT model scales and depths, and they also benchmark a fused cmHC operator. Moderate contraction with K=2 gives the best average loss rank and reduces training and validation loss relative to mHC and mHC-lite without adding learnable parameters, while keeping gradient norms comparable to those baselines and much lower than unconstrained HC. Shallow contraction is generally more stable and more effective than deep contraction across model sizes, with the advantage growing at greater depths. The fused cmHC operator also consistently achieves lower forward and backward latency than mHC, with the largest speedup at small hidden dimensions and a narrowing benefit as hidden dimension increases.


AIでAIを構築

アイデアからローンチまで — 無料のAIコーディング支援、すぐに使える環境、最高のGPU価格でAI開発を加速。

AI コーディング補助
すぐに使える GPU
最適な料金体系

HyperAI Newsletters

最新情報を購読する
北京時間 毎週月曜日の午前9時 に、その週の最新情報をメールでお届けします
メール配信サービスは MailChimp によって提供されています