frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Reproducing DeepSeek's MHC: When Residual Connections Explode

https://taylorkolasinski.com/notes/mhc-reproduction/
51•taykolasinski•2h ago

Comments

taykolasinski•2h ago
OP here. I spent the last few days reproducing the mHC architecture from the recent DeepSeek paper (2512.24880).

Two key takeaways from the reproduction:

Unconstrained Hyper-Connections really do explode (7x amplification even at 10M scale).

I hit a nasty "stream persistence" bug where my tensors were the right shape, but the architecture was functionally broken.

This is Part 1 (10M scale). Part 2 (scaling to 1B on A100s) is coming later this week. Happy to answer questions about the implementation.

WiSaGaN•1h ago
How do you know "GPT-5, Claude, Llama, Gemini. Under the hood, they all do the same thing: x+F(x)."?
taykolasinski•1h ago
I’m referring specifically to the fundamental residual connection backbone that defines the transformer architecture (x_{l+1} = x_l + F(x_l)).

While the sub-modules differ (MHA vs GQA, SwiGLU vs GeLU, Mixture-of-Depths, etc.), the core signal propagation in Llama, Gemini, and Claude relies on that additive residual stream.

My point here is that DeepSeek's mHC challenges that fundamental additive assumption by introducing learnable weighted scaling factors to the residual path itself.

WiSaGaN•1h ago
I guess I am asking how we know Gemini and Claude relies on the additive residual stream. We don't know the architecture details for these closed models?
taykolasinski•1h ago
That's a fair point. We don't have the weights or code for the closed models, so we can't be 100% certain.

However, transformer-based (which their technical reports confirm they are) implies the standard pre-norm/post-nnorm residual block structure. Without those additive residual connections, training networks of that depth (100+ layers) becomes difficult due to the vanishing gradient problem.

If they had solved deep signal propagation without residual streams, that would likely be a bigger architectural breakthrough than the model itself (akin to Mamba/SSMs). It’s a very high-confidence assumption, but you are right that it is still an assumption.

solarkraft•1h ago
I’ve been wondering for a while: Why isn’t this architecture more common in other LLMs? The context efficiency is amazing, after all - doesn’t that translate to a lot of money at scale?
kevmo314•1h ago
It's an incremental improvement, not really a revolutionary step.

That being said, I think one could adapt an existing model to add mHC by initializing the routing matrix to the regular residual connection and then post-train the hyper connection matrices. This would let you continue training more efficiently on existing models.

taykolasinski•1h ago
That initialization strategy (effectively starting as identity to match the standard residual stream) is clever. It would let you surgery an existing model like Llama-3 and fine-tune it into an mHC architecture.

The main risk I see is that the 7x signal amplification happens very aggressively. Even with a gentle initialization, you’d likely need very strict gradient clipping or a tiny learning rate on those new routing matrices to prevent them from blowing up the pre-trained features in the first few steps.

Also, I think there's a mix-up here between mHC (this paper, expressivity) and MLA (latent attention, which provides the massive context efficiency). mHC doesn't save memory, but it might make the model 'smarter' per parameter.

yorwba•46m ago
https://arxiv.org/abs/2512.24880 was published less than two weeks ago, which should explain why it's not more common yet. And it's not that amazing either. It's a slight quality improvement for a slight increase in cost. It's not even clear to me whether it pays for itself.
solarkraft•5m ago
My bad, I took this as something Multi-head Latent Attention (MLA) related.
sbondaryev•54m ago
Nice visualization of the residual connections. Is the animated svg manually created or programmatically generated? What tools did you use?
taykolasinski•47m ago
Thanks! Manually created Astro components with inline SVG and CSS animations.
cpldcpu•52m ago
May be worth pointing out, that this is not the first residual connection innovation to be in production.

Gemma 3n is also using a low-rank projection of the residual stream called LAuReL. Google did not publicize this too much, I noted it when poking around in the model file.

https://arxiv.org/pdf/2411.07501v3

https://old.reddit.com/r/LocalLLaMA/comments/1kuy45r/gemma_3...

Seems to be what they call LAuReL-LR in the paper, with D=2048 and R=64

taykolasinski•25m ago
This is a fantastic catch. I hadn't realized Gemma 3n was already shipping with a variant of this in production.

It feels like we are entering the era of residual stream engineering. For a long time, the standard x + F(x) additive backbone was treated as untouchable. Now, between mHC (weighted scaling) and LAuReL (low-rank projections), labs are finally finding stable ways to make that signal path more dynamic.

I'm curious if the Low-Rank constraint in LAuReL acts as a natural stabilizer against the gradient explosion I saw with unconstrained hyper-connections.

Thanks for the paper link, definitely reading that tonight.

Scene_Cast2•19m ago
I implemented this for a toy 8M ViT-style model. Got neutral results. This is just an anecdote and is not representative - I think mHC will help with larger parameter sizes and larger token counts.
taykolasinski•13m ago
That's interesting.

I suspect your intuition about scale is correct. The theoretical benefit of mHC is that it acts as a sort of relief valve/router for information flow in very deep/wide networks where the standard residual bottleneck becomes an issue. At 8M params, the standard residual stream is likely already perfectly adequate, so mHC might just be adding parameter overhead without solving a real signal propagation problem yet.

Quick question on your run: did you see the signal amplification/instability I saw (values growing during the forward pass)? or was it stable for you, just neutral on loss?

Forget about crop diseases and try this

https://apps.apple.com/us/app/agrisense-field/id6738309189AgriSenseField
1•dasorto•54s ago•0 comments

All the rovers heading to the Moon over the next 10 years

https://jatan.space/moon-monday-issue-256/
1•freediver•1m ago•0 comments

Mac OLM File to PST Converter"

https://apps.microsoft.com/detail/9n7jk7z3546j?hl=en-US&gl=US
1•tieanderson•2m ago•1 comments

iPhone 4 is having a TikTok revival

https://appleinsider.com/inside/iphone/tips/iphone-4-is-having-a-tiktok-revival-heres-how-to-use-...
1•ksec•2m ago•0 comments

They Want You to "Quit Demonstrating"

https://www.motherjones.com/politics/2026/01/trump-renee-good-ice-roger-williams-wesley-hunt-firs...
1•wahnfrieden•2m ago•0 comments

In Defense of the New York City Transit Strike

https://jacobin.com/2026/01/nyc-2005-twu-strike-toussaint
1•wahnfrieden•3m ago•0 comments

Pi Monorepo: AI agent toolkit

https://github.com/badlogic/pi-mono
1•pretext•3m ago•0 comments

How to Build a Habit

https://dogdogfish.com/blog/2026/01/12/building-a-habit/
1•matthewsharpe3•4m ago•0 comments

Show HN: Java In-Memory search using Forage

https://livetheoogway.github.io/forage/
1•tusharnaik•5m ago•0 comments

Kavia AI now supports Bitbucket (agent-driven code analysis and regression diff)

https://www.youtube.com/watch?v=r3la8vo_G0E
1•kavitha_kavia•6m ago•1 comments

Keeping Power Utilities in Corporate Hands Doesn't Make Sense

https://jacobin.com/2025/12/hudson-valley-public-power/
1•PaulHoule•7m ago•0 comments

Show HN: Gdocs-CLI – Fetch Google Docs as Markdown for AI Coding Agents

https://github.com/famasya/gdocs-cli
1•pacific01•7m ago•0 comments

Big Tech 'DRAM Beggars' Scramble for Scarce Inventory

https://www.chosun.com/english/industry-en/2026/01/09/KWC26UZIENDUBIPRVLRLTCINPY/
2•ksec•8m ago•0 comments

Show HN: Server for Pydantic-AI Agents

https://github.com/caesarnine/lattis
2•binalpatel•8m ago•0 comments

Ask HN: Erratic HN front page algorithm

2•7777777phil•10m ago•0 comments

Show HN: Subtle – Local, open-source analytics for Claude Code sessions

2•itsderek23•15m ago•0 comments

Neo Is Starting to Learn on Its Own (1X World Model – From Video to Action)

https://www.youtube.com/watch?v=lS_z60kjVEk
1•fadedlight•16m ago•1 comments

Review: How to Solve It by George Pólya

https://www.thepsmiths.com/p/review-how-to-solve-it-by-george
1•jger15•16m ago•0 comments

Ask HN: How do you automate your release notes?

1•dustfinger•16m ago•1 comments

Bloom: An iOS inspired pull down menu for the web

https://joshpuckett.me/bloom
2•eustoria•17m ago•0 comments

AI Coding Assistants Will Overwhelm Your Delivery Pipeline: How to Prepare

https://aws.amazon.com/blogs/enterprise-strategy/your-ai-coding-assistants-will-overwhelm-your-de...
1•cebert•19m ago•0 comments

pip install hodor

https://github.com/bukzor/hodor
3•chris_guidry•19m ago•0 comments

Project STARSCREAM: Using Cosmic data for training adaptable foundation models

https://www.researchgate.net/publication/399653645_STARSCREAM_A_scientific_framework_for_training...
1•DwayneSamuels•19m ago•0 comments

Security considerations for confidential tip pages

https://freedom.press/digisec/blog/security-confidential-tip-pages/
1•eustoria•20m ago•0 comments

Show HN: mcp-apps-kit - Build AI apps for MCP Apps and ChatGPT from one codebase

https://github.com/AndurilCode/mcp-apps-kit
1•unfold_ai•20m ago•1 comments

Building a 25 Gbit/s workstation for the SCION Association

https://github.com/scionassociation/blog-25gbit-workstation
2•romshark•21m ago•0 comments

Chess in Pure SQL

https://www.dbpro.app/blog/chess-in-pure-sql
2•upmostly•22m ago•0 comments

Ask HN: I built a tool that is catching AI SEO of its own. Should I double down?

2•udit_50•23m ago•0 comments

Roborev: Automated background code review for your agentic commits

https://github.com/wesm/roborev
1•wesm•23m ago•0 comments

Ask HN: Does PPP (Parity Pricing) work for one-time digital products?

https://apmcommunication.com/tech-lead
1•pingananth•24m ago•1 comments