[KongchangAI]
· 2 min read· 1,220 words

Multi-step Euler probing reveals residual network feature dynamics: How weight sharing reshapes representation flow

Multi-step Euler probing reveals residual network feature dynamics: How weight sharing reshapes representation flow

Multi-step Euler refinement reveals residual network stages consist of independent block ODEs, not a single smooth ODE; weight sharing merges them into a smooth flow.

The study proposes an inference-time probing method requiring no retraining: each residual block is applied R times with step size 1/R while keeping total integration duration unchanged. On ConvNeXt, Swin, and ResNet, 128× refinement causes less than a 1-point drop in ImageNet top-1 accuracy, showing refinement itself doesn't change outputs; but changing total duration plummets accuracy to ~1%, and interpolating adjacent block weights loses 8–23 points. This indicates trained stages consist of per-block ODE orders, not a single smooth ODE. Weight sharing turns the stage into a smooth flow, reducing parameters by 34% with only a 1.40-point accuracy drop, and frozen later layers reach 72.2% accuracy after just three blocks vs. 32.5% for standard models.

Residual networks are often viewed as discretized integrators of ODEs, but does this view hold up? A new study uses inference-time multi-step Euler refinement probing to reveal—without retraining—that trained residual networks behave more like a series of independent ODEs than a single smooth ODE. The study validates this finding on ConvNeXt, Swin, and ResNet, and shows how weight sharing can transform segmented feature transformations into a smooth flow.

Study source screenshot

Probing method: inference-time multi-step Euler refinement

The research team designed a probing method that requires no retraining: during inference, each residual block is applied R times with a step size of 1/R. This keeps the total integration duration unchanged while only increasing the integration resolution. If the network were truly simulating a continuous ODE, this refinement should not significantly affect the output.

Experiments on ConvNeXt, Swin, and ResNet show that 128× refinement causes less than a 1 percentage point drop in ImageNet top-1 accuracy. However, changing the total integration duration causes accuracy to plummet to about 1%; and linearly interpolating the weights of adjacent blocks loses 8 to 23 percentage points. These results indicate that a trained stage is composed of the ODE order of each individual block, rather than a single ODE whose weights vary smoothly with depth.

"Multi-step Euler probing provides a lightweight way to observe the dynamics of a trained network without modifying the training process," the authors note. This method is architecture-agnostic, can be widely applied to vision models, and is expected to extend to Transformer language models.

The Euler method is the most basic numerical method for solving initial value problems of ordinary differential equations. For an ODE of the form $\frac{dy}{dt}=f(y,t)$, the Euler method iterates with a fixed step size $h$: $y_{n+1}=y_n+h\cdot f(y_n,t_n)$. In residual networks, the forward pass $x_{l+1}=x_l+F(x_l)$ corresponds exactly to Euler discretization with step size $h=1$, where the residual function $F$ acts as the vector field. Multi-step Euler refinement splits the single step $h=1$ into $R$ substeps $h=1/R$ without changing the total integration duration $T$, i.e., repeatedly applying the same residual block $R$ times. If the network truly simulates a continuous ODE, refinement should converge to the same trajectory; if each block is an independent discrete transformation, refinement will change the trajectory. This idea is in line with step-size convergence analysis in ODE solvers, but operates only at inference time without modifying the training objective or loss function.

Feature transport: sharp turns and smooth flows

The refined paths also reveal how features are transported within a stage. In the third stage of ConvNeXt-T, nine blocks write nearly orthogonal directions, and subsequent blocks do not undo these directions, causing the path to turn sharply at each block boundary. This indicates that the feature transformations of standard residual networks are segmented and directionally diverse.

When these nine blocks share the same set of weights, the same stage becomes a smooth flow. Weight sharing reduces parameters by 34%, but top-1 accuracy drops by only 1.40 percentage points (each model run twice under the same recipe). More strikingly, with shared weights, the same network's frozen subsequent layers can classify its state with 72.2% accuracy after only three of the nine blocks, compared to just 32.5% for the standard model. This means weight sharing promotes progressive abstraction of features, making intermediate representations easier for subsequent layers to utilize.

Weight sharing in the context of residual networks refers to multiple residual blocks within the same stage reusing exactly the same parameters (including convolution kernels and normalization layers). This is equivalent to replacing a discrete sequence originally driven by $N$ different vector fields in turn with repeated application of the same vector field $N$ times, thereby forming a trajectory in function space generated by a single dynamical system. From a dynamical systems perspective, repeated application of the same mapping is more likely to produce smooth, gradual representation evolution, rather than the sharp turns caused by each block introducing its own orthogonal direction. The reduction in parameters comes from collapsing the blocks: $N$ sets of weights are compressed into 1. It is worth noting that weight sharing is not the same as weight tying in recurrent networks, where sharing typically occurs across time steps; here it is across depth, and the two differ in gradient propagation paths.

Significance and outlook

This study offers a nuanced correction to the view of residual networks as ODE integrators: the network may behave as an ODE within a single block, but an entire stage is not a smooth ODE. Weight sharing can merge multiple ODEs within a stage into a single smooth flow, while substantially reducing parameters and maintaining competitiveness.

The authors focus on vision tasks but note that the probing method requires no retraining and is naturally applicable to Transformer language models, especially looped models. Future work can explore the applicability of this probing to a broader range of architectures, as well as the potential of weight-sharing strategies in language models.

The code is open-sourced: https://github.com/jaume2000/dynamics_skip_nn

In summary, multi-step Euler refinement is a powerful diagnostic tool that reveals the feature dynamics of residual networks and provides a new perspective for designing more efficient architectures.

Looped models refer to network structures that reuse the same set or a small number of parameter sets multiple times along the depth dimension, such as Universal Transformer, deep equilibrium models (DEQ), and various recurrent-depth architectures. Such models naturally exhibit the dynamical characteristic of "repeated iteration of the same transformation," which aligns closely with this paper's finding that "weight sharing turns a stage into a smooth flow." Applying multi-step Euler refinement to looped models can directly test whether outputs converge to a fixed point or continuous trajectory as the number of iterations increases, thereby determining whether the model has truly learned a stable dynamical system. In addition, this probing method requires no retraining and only forward inference, making it especially friendly to large-scale language models: it can diagnose whether the representation evolution of intermediate layers is segmented or smooth without touching the training pipeline, providing a low-cost signal for architecture search and parameter efficiency optimization.

One-line Summary

Multi-step Euler refinement reveals that residual network stages consist of independent block ODEs rather than a single smooth ODE, and weight sharing can merge them into a smooth flow.

Paragraph Summary

This study proposes an inference-time probing method that requires no retraining: each residual block is applied R times with a step size of 1/R while keeping the total integration duration unchanged. On ConvNeXt, Swin, and ResNet, 128× refinement causes less than a 1 percentage point drop in ImageNet top-1 accuracy, indicating that refinement itself does not change the output; however, changing the total integration duration plummets accuracy to about 1%, and linearly interpolating adjacent block weights loses 8 to 23 percentage points. This indicates that a trained stage is composed of the ODE order of each individual block, rather than a single ODE whose weights vary smoothly with depth. Feature transport analysis shows that the nine blocks in the third stage of ConvNeXt-T write nearly orthogonal directions, causing sharp turns at block boundaries; with weight sharing, the same stage becomes a smooth flow, parameters decrease by 34% with only a 1.40 point accuracy drop, and frozen subsequent layers achieve 72.2% classification accuracy using only three blocks, compared to just 32.5% for the standard model.

#residual networks#ODE#Euler method#weight sharing#feature dynamics#ConvNeXt#Swin#ResNet#inference-time probing#representation flow
Share:

Related articles