Manifold-constrained hyper-connections (mHCs) have recently been proposed as a principled extension of hyper-connections, where the residual mixing matrices are constrained to be doubly stochastic via projection onto the Birkhoff polytope. In practical mHC implementations, this constraint is enforced by Sinkhorn-Knopp iterations, and the backward pass relies on unrolling the iterative solver. This design introduces substantial computation and memory overhead, and may also yield inaccurate projections when the algorithm converges slowly on challenging inputs, undermining the intended norm-control and stability guarantees of mHCs. In this work, we focus on the practically important 4x4 Birkhoff projection setting and develop an end-to-end acceleration framework. By leveraging the dual formulation, we reduce the problem to a three-dimensional unconstrained convex problem and solve it with Newton's method, achieving fast convergence and high accuracy. For the backward pass, we replace the unrolled differentiation with implicit differentiation, yielding exact gradients without storing intermediate states. To exploit massive parallelism, we design a warp-level CUDA kernel that uses only register-level primitives, avoiding global and shared memory I/O. Extensive experiments against representative open-source baselines demonstrate that the proposed solver yields substantially more reliable doubly stochastic projections -- especially when the input magnitude is large -- and achieves significant end-to-end speedups (including the backward pass), reaching over 20x acceleration at large batch sizes while maintaining orders of magnitude smaller marginal errors.
翻译:流形约束超连接(mHCs)最近被提出作为超连接的一种原则性扩展,其中残差混合矩阵通过投影到Birkhoff多面体上被约束为双随机矩阵。在实际的mHC实现中,该约束通过Sinkhorn-Knopp迭代强制执行,而反向传播依赖于展开迭代求解器。这种设计引入了大量计算和内存开销,并且在算法收敛缓慢时可能产生不精确的投影,从而削弱了mHCs预期的规范控制和稳定性保障。本文聚焦于实践中重要的4×4 Birkhoff投影场景,开发了一种端到端的加速框架。通过利用对偶形式,我们将问题简化为三维无约束凸优化问题,并使用牛顿法求解,实现了快速收敛和高精度。在反向传播中,我们用隐式微分替代展开微分,无需存储中间状态即可获得精确梯度。为充分利用大规模并行性,我们设计了一种基于线程束级别的CUDA内核,仅使用寄存器级原语,避免了全局内存和共享内存的输入输出。针对代表性开源基线的广泛实验表明,所提出的求解器能产生显著更可靠的双随机投影——特别是在输入幅度较大时——并实现了显著的端到端加速(包括反向传播),在大批量场景下加速比超过20倍,同时边际误差保持数个数量级的降低。