Elena' s AI Blog

DeepSeek's mHC: Making Neural Networks Learn Better by Preserving Identity

06 Nov 2026 (updated: 23 Nov 2026) / 35 minutes to read

Elena Daehnhardt

Claude: Concept poster showing a residual connection, Hyper-Connections and mHC, with a doubly stochastic mixing matrix and the Sinkhorn-Knopp step.


TL;DR:
  • mHC (Manifold-Constrained Hyper-Connections) constrains the residual-stream mixing matrices of Hyper-Connections to be doubly stochastic, so the mixing can exchange information between streams without amplifying the signal.
  • The constraint is enforced approximately with 20 Sinkhorn-Knopp iterations; it is a generalised form of the identity mapping, not an exact copy of the input.
  • In DeepSeek's 27B experiments, mHC scores +2.1 points on BBH and +2.3 on DROP over plain Hyper-Connections, with a reported 6.7% training-time overhead at expansion rate 4. HC is marginally ahead on MATH (26.4 vs 26.0).
  • It reduces one source of instability. It does not guarantee stable training, and the paper's largest models are 27B parameters.

📚 This post is part of the "Neural Network Architecture" series

Series: Neural Network Architecture (Part 5 of 9)

Previous: Part 4 — Attention Mechanisms Meet Residual Connections: How Transformers Use Skip Connections

Where this fits:DeepSeek Explore the AI Landscape →

What Is DeepSeek mHC (Manifold-Constrained Hyper-Connections)?

What happens when you give a neural network more freedom to decide how information moves between its layers?

You might expect it to learn better. Sometimes it does. The catch is that the same freedom can make training unstable, rather like letting every driver on a motorway choose their own speed limit.

On 31 December 2025 — the last day of the year, which tells you something about research schedules — DeepSeek published a paper on exactly this problem: “mHC: Manifold-Constrained Hyper-Connections”.

Manifold-Constrained Hyper-Connections (mHC) is a neural network architecture technique from DeepSeek that constrains the learned residual-stream mixing matrices of Hyper-Connections to be doubly stochastic. This restores, in a generalised sense, the identity-mapping property that makes deep residual networks trainable. In experiments with models up to 27 billion parameters, the authors report steadier training and better scores on several benchmarks than unconstrained Hyper-Connections.

What I find interesting is this: the paper takes an idea introduced in 2024 — learnable connections between neural network layers — and adds a mathematical constraint that addresses a stability problem. It is a good example of how research actually progresses: someone proposes a promising idea, others discover its limitations, and careful refinements make it practical.

At first glance, it sounds extremely technical. Manifolds? Hyper-connections? I will explain the problem, the prior work that led here, what DeepSeek contributes, and where the paper falls short. I will keep it accessible even if you have never thought about network architecture before, because the evolution of ideas is worth understanding.

Let’s start with the humble residual connection.

What Are Residual Connections in Neural Networks?

Before we can understand what mHC does, we need residual connections, one of the most important architectural ideas in deep learning.

If you are new to this topic, I suggest reading my foundations post Understanding Neural Network Architecture.

The Problem Residual Connections Solved

Making a network deeper should make it more powerful. In practice, very deep plain networks became hard to train. The ResNet authors described a degradation problem: deeper plain networks reached higher training error than shallower ones, even though the extra layers could, in principle, simply copy their input. Vanishing and exploding gradients are close relatives of that trouble, though not identical to it.

Think of a game of telephone. A message is whispered from person to person, and by the end it is thoroughly distorted. In a very deep network, the signal gets distorted similarly as it passes through many layers.

That is the forward pass. Training also depends on gradients flowing backwards: they tell earlier layers how they should change. In a very deep network, repeatedly multiplying gradients by small or large factors can make them vanish or explode. The earlier layers then learn very little, or learn noise.

The Residual Connection Solution

ResNet popularised residual learning (the arXiv preprint appeared in December 2015 and the paper was published at CVPR 2016). Related shortcut ideas existed before it, but ResNet made them the default for deep networks. The idea is simple:

Instead of forcing information to flow only through the transformations in each layer, create a shortcut that lets it skip directly to later layers.

Mathematically:

\[\text{Output} = \text{Transformation}(\text{Input}) + \text{Input}\]

That $+\,\text{Input}$ part is the residual connection. It creates an “identity mapping”, a direct path for information to flow unchanged through the network. Even if the transformations produce garbage early in training, the identity path ensures that useful information still gets through.

The backward pass benefits too. For a block $x_{l+1} = x_l + F(x_l)$:

\[\frac{\partial x_{l+1}}{\partial x_l} = I + \frac{\partial F(x_l)}{\partial x_l}\]

The identity term $I$ gives gradients a direct route. It does not guarantee perfect gradients, but a plain stack of transformations has no such term at all. Residual connections made it possible to train networks with hundreds of layers.

So far so good. Now, what if the skip path could be learned?

Hyper-Connections: Can Learned Connections Beat Simple Skip Connections?

Residual connections solved the stability problem, but they are rigid. The skip path is just addition, nothing more sophisticated.

Researchers wondered: what if the network could decide how much information from earlier layers should flow where?

The 2024 Breakthrough: Hyper-Connections

In September 2024, researchers from ByteDance (led by Defa Zhu) published a paper at ICLR 2025 introducing “Hyper-Connections” (HC). HC’s central idea is to expand the residual stream width from $C$ to $n \times C$ (where $n$ is the expansion rate, typically 4) and replace the single identity mapping with three separate learned matrices:

  • $H_{\text{res}} \in \mathbb{R}^{n \times n}$: mixes features within the expanded residual stream
  • $H_{\text{pre}} \in \mathbb{R}^{1 \times n}$: aggregates the $n \times C$ stream down to a $C$-dimensional layer input
  • $H_{\text{post}} \in \mathbb{R}^{1 \times n}$: maps the layer output back onto the $n \times C$ stream

Formally, a single HC layer propagates as:

\[x_{l+1} = H_{\text{res}}\, x_l + \bigl(H_{\text{post}}\bigr)^{\top} F\bigl(H_{\text{pre}}\, x_l,\; W_l\bigr)\]

The three matrices act on the small expansion dimension $n$, so the core transformation $F$ still sees a $C$-dimensional input, exactly as in a standard block. The extra work sits elsewhere: $n$ streams to store, mix and move around in memory. I come back to that in the overhead section.

Three architectures side by side: a residual block with a fixed identity skip, Hyper-Connections with a free H_res mixing matrix plus H_pre and H_post, and mHC with the same layout but a doubly stochastic H_res

Diagram 1. mHC is not simply another skip connection. It changes how the n residual streams are mixed.

Why Flexible Connections Can Become Unstable

HC’s experiments showed improvements on language modelling and vision tasks. The problem DeepSeek’s authors identified is in the residual path. In a plain residual network that path is the identity, so the signal from one layer reaches the next untouched. In HC it passes through $H_{\text{res}}$, and across many layers the signal travels through the product of all those matrices.

If each matrix is slightly “too big”, the product compounds. A gain of 1.2 per layer sounds harmless, yet 1.2^60 is roughly 56,000. (That is plain arithmetic to show the compounding, not a measured training result.) Gradients flowing backwards get the same treatment, so the unconstrained matrices break the identity-mapping property that made residual connections so stable, and training stability can deteriorate at large scale.

DeepSeek’s question was therefore: can we keep the mixing, but stop it from amplifying the signal?

Still in this guide

  • How Manifold-Constrained Hyper-Connections (mHC) Work
  • mHC Benchmark Results, Stability and Training Overhead
  • Why Neural Network Architecture Research Still Matters
  • What the Constraint Guarantees, and What It Does Not
  • What the Paper Does Not Show
  • Should You Use mHC When Training Large Language Models?
  • mHC Compared with ResNet, DenseNet, HyperNetworks and DenseFormer
  • Conclusion: mHC Restores Identity Mapping in Hyper-Connections
  • References

You've hit a Deep Dive tutorial.

I spend dozens of hours researching, coding, and breaking things to write these guides. This content is free, but reserved for my subscriber community. Drop your email below to unlock this guide (and all past/future deep dives):

Already a subscriber? Use the magic link from your last newsletter, or reset your password.

New subscribers get an inbox mail: Set a password to unlock articles. The form does not log you in — use the same email afterwards.

desktop bg dark

About Elena

Elena, a PhD in Computer Science, simplifies AI concepts and helps you use machine learning.





Citation
Elena Daehnhardt. (2026) 'DeepSeek's mHC: Making Neural Networks Learn Better by Preserving Identity', daehnhardt.com, 06 November 2026. Available at: https://daehnhardt.com/blog/2026/11/06/deepseek-mhc/
All Posts