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