Residual networks behave differently when repeating or sharing steps

What Extra Euler Steps Reveal About Residual Networks: Feature Dynamics in Weight-Tied and Untied Stages

Machine Learning

Summary

Residual networks are popular deep learning systems that process data through repeated blocks. Each block looks like one step of solving an equation, but it’s unclear if the whole network acts like a smooth process over many steps. The authors test trained networks by repeating blocks multiple times with smaller steps. They find that using the same weights repeatedly creates smoother behavior but slightly reduces accuracy, while treating blocks separately works differently. This helps us understand how features change inside these networks without needing to retrain them.

What this means in practice

  • For machine learning engineers: Enhance deep vision models by applying repeated smaller residual steps to better control feature transformation without retraining.
  • For neural network designers: Design more parameter-efficient models by sharing weights across residual blocks while maintaining near-original accuracy in computer vision tasks.

Authors

Jaume Ivars Grimalt

Abstract

Residual blocks compute x + f(x), the form of one explicit Euler step, but whether trained residual networks behave as integrators of an ordinary differential equation (ODE) is still debated. We probe trained networks at inference without retraining: each block is applied R times with step 1/R, which keeps the integration horizon and only refines the resolution. On ConvNeXt, Swin and ResNet, 128-fold refinement costs less than one ImageNet top-1 point, whereas changing the horizon drops accuracy to about 1% and interpolating the weights of consecutive blocks costs 8 to 23 points. A trained stage is therefore a sequence of one ODE per block, not a single ODE with weights that vary smoothly in depth. The refined path also shows how a stage transports its features. In ConvNeXt-T, the nine blocks of stage 3 write nearly orthogonal directions that no later block undoes, so the path turns sharply at every block boundary. When the nine blocks share one set of weights, the same stage becomes a single smooth flow: with 34% fewer parameters it loses 1.40 top-1 points (two runs per model under one recipe), and the frozen later layers of the same network already classify its state at 72.2% after three of the nine blocks, against 32.5% for the standard model. We focus on vision; the probe needs no retraining, and transformer language models, looped ones in particular, are the natural next test. Code: https://github.com/jaume2000/dynamics_skip_nn