Source-linked AI summary

mHC-lite: You Don't Need 20 Sinkhorn-Knopp Iterations

Yongyi Yang, Jianyang Gao

arXiv:2601.05732v1cs.LGcs.AI

TL;DR

Dynamic residual matrices improve information mixing but can destabilize training, and mHC's finite Sinkhorn–Knopp iterations leave approximation and implementation limitations. mHC-lite reparameterizes these matrices as convex combinations of permutation matrices, yielding exact doubly stochasticity with native operations. Experiments report comparable or better performance, higher throughput, and removal of observed residual-matrix instabilities.

  • Problem

    Unconstrained dynamic residual matrices risk training instability, while finite Sinkhorn–Knopp iterations in mHC may leave a non-negligible approximation gap to doubly stochasticity.

  • Method

    mHC-lite parameterizes doubly stochastic residual matrices as convex combinations of permutation matrices, avoiding Sinkhorn–Knopp iterations and specialized kernels.

  • Results

    mHC-lite matches or surpasses mHC in downstream performance while achieving higher training throughput and removing residual-matrix instabilities observed in mHC and HC.

  • Takeaways & Limitations

    Exact construction and native matrix operations make mHC-lite a competitive alternative to mHC with improved practicality and stability within the reported experiments.

  • Takeaways & Limitations

    Sinkhorn–Knopp convergence can be extremely slow for some strictly positive matrices, so a fixed iteration count may provide a poor doubly stochastic approximation.

Abstract

from arXiv · show

Hyper-Connections (HC) generalizes residual connections by introducing dynamic residual matrices that mix information across multiple residual streams, accelerating convergence in deep neural networks. However, unconstrained residual matrices can compromise training stability. To address this, DeepSeek's Manifold-Constrained Hyper-Connections (mHC) approximately projects these matrices onto the Birkhoff polytope via iterative Sinkhorn--Knopp (SK) normalization. We identify two limitations of this approach: (i) finite SK iterations do not guarantee exact doubly stochasticity, leaving an approximation gap that can accumulate through network depth and undermine stability; (ii) efficient SK implementation requires highly specialized CUDA kernels, raising engineering barriers and reducing portability. Motivated by the Birkhoff--von Neumann theorem, we propose mHC-lite, a simple reparameterization that explicitly constructs doubly stochastic matrices as convex combinations of permutation matrices. This approach guarantees exact doubly stochasticity by construction and can be implemented using only native matrix operations. Extensive experiments demonstrate that mHC-lite matches or exceeds mHC in performance while achieving higher training throughput with a naive implementation and eliminating the residual instabilities observed in both HC and mHC. The code is publicly available at https://github.com/FFTYYY/mhc-lite.

1. Introduction

Hyper-Connections improve residual-stream mixing but can destabilize training, while mHC addresses this with approximate doubly stochastic constraints that remain imperfect and costly to implement. mHC-lite instead constructs exact doubly stochastic matrices directly, matching or exceeding mHC performance while improving throughput and stability.

  • Hyper-Connections mix information across multiple residual streams, enriching residual connections and accelerating convergence.
  • Unconstrained dynamic residual matrices can cause unstable gradients, including exploding gradients when nonidentity mappings compose repeatedly across depth.
  • mHC constrains residual matrices approximately to the Birkhoff polytope using Sinkhorn–Knopp iterations, whose doubly stochastic matrices have unit row and column sums.
  • With 20 iterations, Sinkhorn–Knopp may leave substantial constraint errors: an example produced column sums 1.92, 0.59, and 0.59 after starting with α = 10^-13.Such errors may accumulate through network depth and introduce stability risks.
  • mHC also relies on specialized fused CUDA kernels and recomputation strategies, increasing engineering complexity and reducing portability across generic deep-learning stacks.These barriers make mHC difficult to adopt as a drop-in replacement for identity residual connections.
  • mHC-lite uses convex combinations of permutation matrices to guarantee exact doubly stochasticity with native matrix operations, while matching or exceeding mHC performance and improving throughput and stability.

2. Background

Residual connections support deep-network training, while Hyper-Connections expand residual streams and dynamically mix them. Manifold-Constrained Hyper-Connections constrain these residual matrices to the Birkhoff polytope using Sinkhorn–Knopp normalization.

  • Residual connections provide identity paths that mitigate vanishing gradients and support training extremely deep networks.
  • Hyper-Connections (HC): Hyper-Connections expand one residual stream into multiple streams and introduce dynamic connections that mix information across them.
  • Hyper-Connections (HC): HC uses dynamically determined residual matrices to mix residual streams, while additional matrices aggregate inputs and expand outputs.
  • Manifold-Constrained Hyper-Connections (mHC): Manifold-Constrained Hyper-Connections constrains residual matrices to the Birkhoff polytope, the set of doubly stochastic matrices.
  • Manifold-Constrained Hyper-Connections (mHC): Doubly stochastic matrices have spectral norms bounded by 1 and remain doubly stochastic under matrix multiplication, providing identity-like stability.
  • Manifold-Constrained Hyper-Connections (mHC): mHC alternately rescales matrix columns and rows so their sums equal 1, repeating Sinkhorn–Knopp normalization 20 times.

3. Methodology

mHC-lite replaces finite Sinkhorn–Knopp normalization with an exact, native-operator parameterization of doubly stochastic residual matrices, targeting mHC’s stability and portability limitations. The method uses convex combinations of permutation matrices while preserving mHC’s structure and achieves comparable stabilizing behavior.

  • Stability analysis: Finite SK iterations can leave mHC residual matrices noticeably away from doubly stochasticity, with deviations accumulating through network depth.The paper notes that 20 iterations do not guarantee exactness; approximately 27.9% of measured SK inputs satisfy 1/ν ≥ 10^13, and column-sum deviations can reach 220% in a 24-layer network.
  • Re-parameterization: mHC-lite uses the Birkhoff–von Neumann theorem to represent doubly stochastic matrices as convex combinations of permutation matrices.The theorem provides nonnegative weights summing to one over permutation matrices, yielding exact doubly stochasticity by construction.
  • Implementation: The reparameterization removes iterative SK computation and can be implemented with standard matrix operations instead of specialized CUDA kernels.For n = 4 residual streams, the method uses n! = 24 permutation matrices and computes the construction through matrix multiplication with a constant 0/1 matrix.
  • Architecture: mHC-lite preserves mHC’s surrounding structure while dynamically producing residual mappings from layer features.The method retains mHC’s structure except for Hres and computes dynamic weights through a linear layer with softmax activations.
  • Computational considerations: The method’s residual-connection FLOPs are typically negligible relative to attention and MLP computation, making portability its main computational advantage.The construction avoids repeated iterative kernels and relies on native operators across frameworks.
  • Empirical behavior: In the L-model FineWeb-Edu experiment, mHC-lite has a slightly lower gradient norm than mHC while both are substantially more stable than HC.Figure 2 compares smoothed gradient trajectories and shows reduced fluctuations for mHC-lite relative to mHC.

4. Experiments

Experiments compare mHC-lite with HC and mHC across model scales, evaluating performance, throughput, and residual-matrix stability. mHC-lite matches or slightly exceeds mHC while preserving throughput and guaranteeing doubly stochastic residual matrices by construction.

  • Experimental Setup: mHC-lite is evaluated in nanoGPT at S, M, and L scales on OpenWebText and FineWeb-Edu, with n fixed to 4.The S, M, and L models have 6, 12, and 24 layers, respectively.
  • Performance and Training Stability: mHC-lite achieves performance on par with or slightly better than mHC across datasets and model scales.The comparison uses final training and validation losses.
  • Performance and Training Stability: mHC-lite exhibits the same training-stabilizing effect as mHC, with slightly lower gradient norms in the examined L-model FineWeb-Edu configuration.The gradient-norm comparison is reported for a specific configuration rather than all experiments.
  • Efficiency: mHC-lite achieves higher throughput than HC without system-level optimization, while the reported PyTorch mHC implementation may underestimate specialized-kernel performance.The throughput metric is tokens per second measured during optimizer updates on eight NVIDIA A100 GPUs.
  • Stability Analysis: 20 SK iterations may not converge well for outliers with log(1/ν) > 30, and these outliers are generally more prevalent in deeper models.The paper describes 20 iterations as a reasonable trade-off overall but not generically sufficient for deeper networks.
  • Stability Analysis: For mHC, individual residual-matrix column sums can deviate substantially from 1, while layer-wise compositions drift farther from 1 as model depth increases.The deviation is reported as more severe for 24-layer than 6-layer models.
  • Stability Analysis: mHC-lite guarantees exact doubly stochasticity for residual matrices and their compositions through Birkhoff–von Neumann parameterization.It avoids iterative normalization and its convergence-related failure modes.

5. Conclusion and Discussion

The discussion frames mHC-lite as a reparameterization-based alternative to finite-step SK projection. It removes the approximation gap and specialized-kernel requirement, while its computational cost can grow with the number of residual streams.

  • Method and Implications: mHC-lite reparameterizes doubly stochastic matrices using the Birkhoff–von Neumann theorem, replacing SK iterations with basic operators.The construction explicitly represents matrices as convex combinations of permutation matrices.
  • Method and Implications: This reparameterization enforces the constraint by construction and removes the approximation gap associated with finitely many SK iterations.The paper presents this as a shift from projection to reparameterization.
  • Limitations and Scalability: For larger n, the method’s space and time complexity grow exponentially, although sampling a subset of permutation matrices can reduce computational cost.The discussion notes that n = 4 was found to be a strong practical choice in prior HC ablations.

A. Hyperparameters

The appendix identifies shared and scale-specific hyperparameters for the experiments, with separate tables organizing these settings.

  • Shared Hyperparameters: Shared experimental hyperparameters are summarized in Table 2.The text directs readers to the appendix for the complete settings.
  • Scale-Specific Hyperparameters: Scale-specific hyperparameters for the three model scales are listed in Table 3.The table complements the shared settings with model-scale-specific values.
Loading 2601.05732v1…