Naturally Computed Scale Invariance in the Residual Stream of ResNet18

André Longon
4/22/2025
cs.CVcs.LG

Official code: cest-andre/residual-stream-interp (0 stars, last commit 2025-04-24).

Abstract

An important capacity in visual object recognition is invariance to image-altering variables which leave the identity of objects unchanged, such as lighting, rotation, and scale. How do neural networks achieve this? Prior mechanistic interpretability research has illuminated some invariance-building circuitry in InceptionV1, but the results are limited and networks with different architectures have remained largely unexplored. This work investigates ResNet18 with a particular focus on its residual stream, an architectural component which InceptionV1 lacks. We observe that many convolutional channels in intermediate blocks exhibit scale invariant properties, computed by the element-wise residual summation of scale equivariant representations: the block input's smaller-scale copy with the block pre-sum output's larger-scale copy. Through subsequent ablation experiments, we attempt to causally link these neural properties with scale-robust object recognition behavior. Our tentative findings suggest how the residual stream computes scale invariance and its possible role in behavior. Code is available at: https://github.com/cest-andre/residual-stream-interp

View on arXivView PDF

Code Implementations(1)

00Shell, PythonJul 5, 20241 years ago

Similar Papers

Cite this paper

@article{longon2025naturally,
  title  = {Naturally Computed Scale Invariance in the Residual Stream of ResNet18},
  author = {André Longon},
  year   = {2025},
  eprint = {2504.16290},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.16290v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.16290.svg)](https://codeofpaper.com/paper/2504.16290)

Discussion