Command Palette
Search for a command to run...
cmHC: موازنة خلط التيارات في الاتصالات الفائقة عبر الانكماش الهندسي
cmHC: موازنة خلط التيارات في الاتصالات الفائقة عبر الانكماش الهندسي
الملخص
توسّع الاتصالات الفائقة المقيّدة بالمتعددات (mHC) الاتصالات المتبقية إلى تيارات متعددة وتثبّت الانتشار المتبقي عن طريق تقييد مصفوفات خلط التيارات المتبقية بمتعدد بيركهوف، أي مجموعة المصفوفات العشوائية المزدوجة. في هذا العمل، نبحث في كيفية خلط التيارات المتبقية بفعالية داخل متعدد بيركهوف. ونكشف عن مقايضة في الخلط: عندما تبقى المصفوفات المتبقية ناقصة الخلط قريبة من رؤوس متعدد بيركهوف، تتدهور الاتصالات الفائقة إلى مجموعة من التيارات شبه المستقلة؛ وعندما تتركّز المصفوفات المتبقية مفرطة الخلط حول المركز الثقالي المنتظم للمتعدد، تصبح التيارات أقل قابلية للتمييز فيما بينها. ونتحقق نظريًا من نتائجنا عبر وضع حدود للخلط المتبقي التراكمي، وفرق التيارات، وفرق التدرج لمعاملات الخلط عبر الطبقات. وبدافع من هذه النتائج، نقترح الانكماش للاتصالات الفائقة المقيّدة بالمتعددات (cmHC)، وهي طريقة عشوائية مزدوجة دقيقة تعمل على تقليص متعدد بيركهوف هندسيًا نحو داخله. ويخفف هذا الانكماش من نقص الخلط عن طريق إجبار المصفوفات المتبقية على التعمق أكثر داخل المتعدد، مع حد قابل للإثبات لخلط التيارات ودون إضافة معاملات جديدة. علاوة على ذلك، نطبّق انكماشًا معتدلًا في الطبقات الضحلة لمنع الإفراط في الخلط، مما يتيح انتشارًا مستقرًا للتدرجات في التدريب المسبق لنماذج واسعة النطاق للغاية. وتُظهر تجارب موسعة على النماذج الكثيفة ونماذج مزيج الخبراء عند مقاييس معاملات متنوعة فعالية cmHC وقابليته للتوسع. كما نطوّر عوامل مدمجة لـ cmHC على وحدات المعالجة العصبية Ascend، مما يقلل زمن تنفيذ الاتصالات الفائقة بنسبة تصل إلى 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 n feature streams xl∈Rn×d, updating them through residual mixing and Transformer branches. To ensure training stability, mHC-lite constrains the residual mixing matrix Hlres to the Birkhoff polytope by parameterizing it as a convex combination of permutation matrices Pm. 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 α 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 Pm with a smoothed version Pm′ controlled by a contraction strength parameter λ∈(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 α that further promotes excessive mixing.
To balance these effects, the authors propose a moderate contraction strategy applied only to the first K 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.