GHC:Expanding Residual Interfaces in Hyper-Connections
Organizations: Tsinghua University · University of Chinese Academy of Sciences · StepFun · The Hong Kong University of Science and Technology (Guangzhou)
Abstract
Hyper-Connections expand residual capacity across parallel streams, yet restrict every branch to narrow read and write interfaces: each branch still reads a single stream mixture and writes scaled copies of one output vector to all streams. To lift this bottleneck, we propose Grouped Hyper-Connections (GHC). By partitioning each branch into parallel groups along attention heads or FFN channels, GHC supplies each group with a distinct stream mixture and aggregates their separate outputs into each stream with learned weights. Extensive experiments across dense and Mixture-of-Experts (MoE) models show that GHC consistently improves upon Identity Hyper-Connections (IHC) with negligible parameter and memory-access overhead, increasing training efficiency by 35% over Pre-Norm and 10% over IHC. Moreover, expanding residual interfaces overcomes the diminishing returns of adding streams, allowing wider residual states to yield further gains.
Figures & tables
| Model | Method | Avg. Loss | LAMBADA | PIQA | HellaSwag | TriviaQA | MATH | GSM8K | HumanEval | Avg. Score |
|---|---|---|---|---|---|---|---|---|---|---|
| 430M Dense | Pre-Norm | 2.0713 | 14.41 | 67.19 | 47.44 | 13.64 | 3.54 | 2.96 | 7.32 | 23.68 |
| IHC | 2.0351 | 12.29 | 68.01 | 49.75 | 16.09 | 3.56 | 2.73 | 10.37 | 25.09 | |
| GHC(ours) | 2.0161 | 12.47 | 68.77 | 50.79 | 16.94 | 4.06 | 3.87 | 10.37 | 25.80 | |
| 4BA0.2B MoE | Pre-Norm | 1.9260 | 12.95 | 71.55 | 54.68 | 23.31 | 5.52 | 5.84 | 12.20 | 28.85 |
| IHC | 1.9066 | 10.67 | 71.87 | 55.98 | 24.90 | 6.14 | 5.31 | 14.02 | 29.70 | |
| GHC(ours) | 1.8862 | 10.30 | 71.98 | 57.83 | 26.78 | 7.40 | 5.99 | 17.68 | 31.28 |
| Method | Setting | Avg. Loss | |
|---|---|---|---|
| IHC | 2.0351 | 0.0028 | |
| 2.0323 | |||
| AttnRes | 2.0363 | 0.0041 | |
| 2.0322 | |||
| GHC | 2.0161 | 0.0195 | |
| 1.9966 |
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | (M) | (B) | Steps | Avg. Loss | ||
|---|---|---|---|---|---|---|
| Pre-Norm | 12 | 476.6 | 9.53 | 2.56 | 9,091 | 2.2437 |
| 14 | 723.0 | 14.46 | 1.92 | 13,792 | 2.1378 | |
| 16 | 1048.6 | 20.97 | 1.48 | 20,002 | 2.0522 | |
| 18 | 1451.1 | 29.02 | 1.19 | 27,677 | 1.9796 | |
| IHC | 12 | 477.9 | 9.56 | 2.56 | 9,117 | 2.2122 |
| 14 | 724.9 | 14.50 | 1.92 | 13,826 | 2.1113 |
| Specification | 4B MoE | 13B MoE |
|---|---|---|
| Total / MoE layers | 12 / 10 | 16 / 14 |
| Hidden dimension | 1024 | 1536 |
| Dense FFN / Expert width | 4096 / 512 | 6144 / 768 |
| Routed / Active experts | 256 / 8 | 256 / 8 |
| Sliding / Full Q-heads | 8 / 8 | 16 / 8 |
| Non-embedding params | 4.12B | 12.93B |
| Method | Bounded | Signed | Width-Calib. | Lightweight | ||
|---|---|---|---|---|---|---|
| HC | ✗ | ✓ | ✗ | ✓ | ||
| mHC | ✓ | ✗ | ✗ | ✓ | ||
| VWN | ✗ | ✓ | ✓ | ✓ | ||
| GR | ✓ | ✗ | ✓/✗ | ✗/✓ | ||
| IHC | ✓ | ✗ | ✗ | ✓ | ||
| GHC (ours) | ✓ | ✓ | ✓ | ✓ |
| Method | Attn & Dense | MoE Routing | MoE Read / Write | Avg. Loss | |
|---|---|---|---|---|---|
| Pre-Norm | Pre-Norm | Global top-8 ( ) | Single stream | 1.9260 | +0.0194 |
| IHC | IHC ( ) | Global top-8 ( ) | Shared dynamic ( ) | 1.9066 | + 0.0000 |
| IHC + Group MoE | IHC ( ) | Grouped | Shared dynamic ( ) | 1.9179 | +0.0113 |
| GHC + Group MoE | GHC ( ) | Grouped | Group dynamic ( ) | 1.9023 | 0.0043 |
| GHC (MoE ) | GHC ( ) | Global top-8 ( ) | Shared dynamic ( ) | 1.8945 | 0.0121 |
| GHC (MoE ) + Router | GHC ( ) | Global top-8 ( ) | Shared dynamic ( ) | 1.8960 | 0.0106 |
| Benchmark | Examples | Shots | Metric |
|---|---|---|---|
| LAMBADA | 5,153 | 0 | Final-word Perplexity |
| PIQA | 1,838 | 0 | Length-norm. Accuracy |
| HellaSwag | 10,042 | 0 | Length-norm. Accuracy |
| TriviaQA | 17,944 | 5 | Normalized Exact Match |
| MATH | 5,000 | 4 | Mathematical Equivalence |
| GSM8K | 1,319 | 8 | Flexible Exact Match |
| Prefill (ms) | Decode (ms) | Total (ms) | Peak Mem (GiB) | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Batch Size | Method | PyTorch | Fused | PyTorch | Fused | PyTorch | Fused | Speedup | PyTorch | Fused |
| 2 | Pre-Norm | 129.23 | 63.30 | 1,974.57 | 1,065.92 | 2,103.74 | 1,129.17 | 2.49 | 3.30 | |
| IHC | 249.76 | 70.20 | 3,101.25 | 1,386.76 | 3,350.79 | 1,456.96 | 2.67 | 3.40 | ||
| GHC | 387.25 | 83.95 | 3,298.65 | 1,376.93 | 3,686.04 | 1,460.97 | 4.60 | 4.02 | ||
| 8 | Pre-Norm | 476.61 | 230.93 | 1,973.65 | 1,064.26 | 2,450.60 | 1,295.01 | 5.86 | 5.82 | |
| IHC | 947.04 | 266.37 | 3,081.10 | 1,423.12 | 4,027.71 | 1,688.82 | 6.57 | 6.09 | ||
| 430M ( , ) | Large ( , ) | |||||
| Projection / Interface Stage | Pre-Norm | IHC | GHC | Pre-Norm | IHC | GHC |
| HC controller ( /layer) | 0.00 | 31.49 | 32.40 | 0.00 | 33.31 | 34.06 |
| Attn input (mix + RMSNorm + QKVG proj.) | 73.46 | 84.07 | 121.82 | 317.86 | 307.51 | 341.14 |
| Attn output (out proj. + write-back) | 28.27 | 48.65 | 68.62 | 83.54 | 98.64 | 159.38 |
| FFN input (mix + RMSNorm + up/gate proj. + SiTU) | 206.50 | 221.04 | 240.55 | 712.01 | 725.74 | 686.62 |
| FFN output (down proj. + write-back) | 76.06 | 95.16 | 144.60 | 305.78 | 337.03 | 366.24 |
| Parallelism | Workload | Pre-Norm | IHC ( ) | GHC ( ) |
|---|---|---|---|---|
| TP=8 + SP (Attn & FFN) | 391.8 | 404.1 ( ) | 403.5 ( ) | |
| 423.3 | 437.6 ( ) | 436.9 ( ) | ||
| TP=8 + SP (Attn), Replicated FFN | 292.4 | 306.9 ( ) | 314.6 ( ) | |
| 325.4 | 340.4 ( ) | 347.5 ( ) |
Hyper-Connections
Hyper-connections expand neural-network residual paths into multiple streams with learned routing and mixing to improve capacity, stability, and efficiency.
See all 22 papers