Do ResNets Route? Sparse Interaction Experts in Residual Networks
Organizations: Fudan University · University of Washington · Tongji University · Shandong University ·
Abstract
Residual networks execute every block for every input, yet their functional contributions need not be input independent. We formulate a trained ResNet as a set function over binary residual-branch masks and apply Möbius inversion to decompose its output exactly into individual residual corrections and higher-order interactions. For smooth residual stacks, we show that each fixed -way interaction scales as under residual scaling. Exhaustive analysis of ImageNet-pretrained ResNet-18 and ResNet-34 reveals that interaction mass peaks at orders five and ten, respectively, rather than at low orders. Reducing the residual scale shifts both spectra toward lower orders, but also changes model predictions. The interaction coefficients are concentrated in magnitude but not hard sparse, and prediction-preserving sparsity weakens with depth. Crucially, the dominant interactions vary across inputs and predicted classes around a shared global core, while their overall complexity changes little with sample difficulty. These results show that dense ResNets implement an implicit form of soft routing: every block is executed, but different inputs rely on different residual interaction experts. Routing can therefore emerge at the level of functional contribution without an explicit router or sparse execution.
Figures & tables
| Method | Norm ratio | Rel. error ( ) | Scaled error ( ) | Cosine ( ) | Top-1 agree ( ) | |
| 18 | ||||||
| Möbius 1 1 1 ResNet-18, before rounding: relative error , optimally scaled error . | 1.000 | 0.000 | 0.000 | 1.000 | 1.000 | |
| 34 | ||||||
Appendix figures & tables26 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Meaning |
|---|---|
| Residual network, masks, and readouts | |
| Input image; number of images; number of classes. | |
| Number and index set of residual blocks; block indices. | |
| Residual branch, shortcut, and activation of block . | |
| Hidden state at block under mask . | |
| Residual-branch mask; disables branch only. | |
| Model | Reconstruction | Norm ratio | Rel. error | Scaled error | Cosine | Top-1 agree |
|---|---|---|---|---|---|---|
| ResNet-18 | Raw sum | |||||
| Mean output | ||||||
| Centered sum | ||||||
| Möbius | ||||||
| ResNet-34 | Raw sum | |||||
| Mean output |
| Model | Readout | Peak ( ) | ||||
|---|---|---|---|---|---|---|
| ResNet-18 | Scalar | |||||
| Vector | ||||||
| ResNet-34 | Scalar | |||||
| Vector |
| ResNet-18 | ResNet-34 | |||
|---|---|---|---|---|
| Scalar | Vector | Scalar | Vector | |
| 1 | ||||
| 2 | ||||
| 3 | ||||
| 4 | ||||
| 5 | ||||
| Top-1 agreement | |||||
|---|---|---|---|---|---|
| 1.00 | 5.0009 | 4.9295 | 0.1417 | 0.1356 | 1.0000 |
| 0.95 | 4.9756 | 4.9002 | 0.1491 | 0.1447 | 0.9375 |
| 0.90 | 4.9448 | 4.8706 | 0.1573 | 0.1541 | 0.8759 |
| 0.85 | 4.9086 | 4.8389 | 0.1671 | 0.1640 | 0.8093 |
| 0.80 | 4.8635 | 4.8022 | 0.1786 | 0.1751 | 0.7314 |
| 0.75 | 4.8042 | 4.7572 | 0.1933 | 0.1882 | 0.6365 |
| Top-1 agreement | |||||
|---|---|---|---|---|---|
| 1.00 | 9.8872 | 9.8835 | 0.0012 | 0.0011 | 1.0000 |
| 0.95 | 9.8462 | 9.8390 | 0.0014 | 0.0013 | 0.9200 |
| 0.90 | 9.8027 | 9.7938 | 0.0017 | 0.0016 | 0.8780 |
| 0.85 | 9.7616 | 9.7474 | 0.0020 | 0.0020 | 0.8140 |
| 0.80 | 9.7013 | 9.6957 | 0.0025 | 0.0024 | 0.7430 |
| 0.75 | 9.6391 | 9.6373 | 0.0032 | 0.0030 | 0.6630 |
| Retained | Agree | ||||||
|---|---|---|---|---|---|---|---|
| ResNet-18 ( , ) | |||||||
| 1% | 3 | 0.2445 | 0.9934 | 0.1450 | 4.0016 | 0.0019 | 0.0019 |
| 5% | 13 | 0.6140 | 0.8625 | 0.4345 | 4.0782 | 0.1214 | 0.0063 |
| 10% | 26 | 0.8161 | 0.6754 | 0.6548 | 3.6881 | 0.1671 | 0.0339 |
| 25% | 64 | 0.9751 | 0.2644 | 0.9364 | 1.7686 | 0.4896 | 0.3048 |
| 50% | 128 | 0.9988 | 0.0575 | 0.9971 | 0.2850 | 0.9554 | 0.8766 |
| Model | Retained | Relative error | Top-1 agreement | |||||
|---|---|---|---|---|---|---|---|---|
| Magnitude | Random | Order-matched | Magnitude | Random | Order-matched | |||
| ResNet-18 | 25% | 64 | 1.7686 | 7.9048 | 7.3574 | 0.3048 | 0.0028 | 0.0044 |
| 50% | 128 | 0.2850 | 9.0794 | 7.7646 | 0.8766 | 0.0042 | 0.0068 | |
| ResNet-34 | 25% | 16,384 | 35.5789 | 123.0253 | 117.9390 | 0.0020 | 0.0018 | 0.0006 |
| 50% | 32,768 | 13.8741 | 141.9837 | 111.8046 | 0.0060 | 0.0016 | 0.0024 | |
| Model | Criterion | Mean | |
|---|---|---|---|
| ResNet-18 | 150.60 | 59.059% | |
| 186.64 | 73.191% | ||
| 55.77 | 21.870% | ||
| 68.59 | 26.898% | ||
| 99.85 | 39.155% | ||
| ResNet-34 | 65,203.74 | 99.495% |
| Retained | Lift h | ||||||
|---|---|---|---|---|---|---|---|
| ResNet-18 ( ) | |||||||
| 1.18% | 3 | 0.6334 | 0.5972 | 0.0362 | 1.061 | 0.0069 | 0.6900 |
| 3.14% | 8 | 0.6623 | 0.6318 | 0.0305 | 1.048 | 0.0167 | 0.7312 |
| 5.10% | 13 | 0.6885 | 0.6560 | 0.0325 | 1.050 | 0.0268 | 0.7443 |
| 10.20% | 26 | 0.7778 | 0.7557 | 0.0222 | 1.029 | 0.0537 | 0.8072 |
| 12.55% | 32 | 0.8329 | 0.8150 | 0.0179 | 1.022 | 0.0683 | 0.8705 |
| Retained | |||||||
|---|---|---|---|---|---|---|---|
| ResNet-18 | |||||||
| 1.18% | 3 | 0.0362 | 0.0361 | 0.1911 | 0.0710 | 0.1200 | 0.0014 |
| 3.14% | 8 | 0.0305 | 0.0327 | 0.2535 | 0.1289 | 0.1246 | 0.0019 |
| 5.10% | 13 | 0.0325 | 0.0347 | 0.2994 | 0.1765 | 0.1229 | 0.0005 |
| 10.20% | 26 | 0.0222 | 0.0279 | 0.3844 | 0.2804 | 0.1040 | -0.0009 |
| 12.55% | 32 | 0.0179 | 0.0256 | 0.4195 | 0.3248 | 0.0947 | 0.0003 |
| Model | Vector 1-NN | Scalar 1-NN | Chance | Max conf. gap |
|---|---|---|---|---|
| ResNet-18 | 0.0039 | 0.2423 | 0.0010 | 0.0045 |
| ResNet-34 | 0.0033 | 0.0991 | 0.0010 | 0.0031 |
| Difficulty | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ResNet-18 | ||||||||||
| NLL | 0.0313 | 0.0352 | 0.0157 | 0.0182 | -0.0080 | 0.0711 | 0.0489 | 0.0267 | 0.0232 | 0.0238 |
| Wrong | 0.0186 | 0.0237 | 0.0063 | 0.0083 | 0.0002 | 0.0264 | -0.0009 | 0.0170 | 0.0116 | 0.0103 |
| True margin | 0.0268 | 0.0306 | 0.0137 | 0.0162 | -0.0073 | 0.0575 | 0.0351 | 0.0237 | 0.0187 | 0.0187 |
| Confidence | 0.0383 | 0.0407 | 0.0154 | 0.0191 | -0.0080 | 0.0883 | 0.0796 | 0.0334 | 0.0298 | 0.0335 |
| Predicted margin | 0.0339 | 0.0355 | 0.0102 | 0.0145 | -0.0052 | 0.0665 | 0.0598 | 0.0315 | 0.0254 | 0.0290 |
| Difficulty | |||||
|---|---|---|---|---|---|
| ResNet-18 | |||||
| NLL | 0.0533 | 0.0637 | -0.0355 | -0.0456 | 0.0275 |
| Wrong | 0.0234 | 0.0333 | -0.0186 | -0.0320 | 0.0211 |
| True margin | 0.0478 | 0.0571 | -0.0369 | -0.0435 | 0.0290 |
| Confidence | 0.0654 | 0.0757 | -0.0326 | -0.0447 | 0.0250 |
| Predicted margin | 0.0550 | 0.0639 | -0.0365 | -0.0443 | 0.0286 |
| Quantity | Easy | Hard | Hard Easy | Relative (%) |
|---|---|---|---|---|
| ResNet-18 | ||||
| 89.1949 | 89.4823 | 0.2874 | 0.322 | |
| 62.7012 | 63.0648 | 0.3635 | 0.580 | |
| 4.9283 | 4.9319 | 0.0036 | 0.073 | |
| 0.135677 | 0.135351 | -0.000326 | -0.241 | |
| 148.7320 | 151.5508 | 2.8188 | 1.895 | |
| Quantity | Correct | Wrong | Wrong Correct | Relative (%) |
|---|---|---|---|---|
| ResNet-18 | ||||
| 89.2743 | 89.4619 | 0.1876 | 0.210 | |
| 62.7944 | 63.0482 | 0.2538 | 0.404 | |
| 4.9300 | 4.9320 | 0.0020 | 0.041 | |
| 0.135411 | 0.135413 | 0.002 | ||
| 150.5648 | 151.3084 | 0.7436 | 0.494 | |
| Model | |||||||
|---|---|---|---|---|---|---|---|
| ResNet-18 | -0.0306 | -0.001003 | 0.1311 | -0.0086 | 0.0913 | -0.007939 | |
| ResNet-34 | -5.7765 | -0.000242 | 0.8280 | -5.1910 | 0.9821 | 0.000174 |
Residual Learning
Residual learning studies methods that learn incremental updates or error corrections, helping deep networks and hybrid models refine predictions.
See all 158 papers