🤖 AI Summary
This work addresses the sensitivity of commonly used similarity measures—such as cosine similarity—in neural representation analysis to coordinate transformations, stemming from their neglect of the intrinsic gauge freedom in representation spaces. Adopting a differential-geometric perspective, the paper conceptualizes neural representations as equivalence classes under the action of the general linear group and introduces, for the first time, the notion of gauge freedom to unify explanations for phenomena like the instability of cosine similarity and embedding anisotropy. The authors argue that analyses should focus on gauge-invariant quantities or explicitly fix a gauge coordinate system. Through experiments with multilayer perceptrons and convolutional networks using methods such as SVCCA and CKA, they demonstrate that inserting invertible linear transformations—while preserving model predictions—can drastically distort similarity and neighborhood structures, thereby revealing the strong dependence of current metrics on the choice of metric (gauge).
📝 Abstract
Neural network representations are often analyzed as vectors in a fixed Euclidean space. However, their coordinates are not uniquely defined. If a hidden representation is transformed by an invertible linear map, the network function can be preserved by applying the inverse transformation to downstream weights. Representations are therefore defined only up to invertible linear transformations. We study neural representation spaces from this geometric viewpoint and treat them as vector spaces with a gauge freedom under the general linear group. Within this framework, commonly used similarity measures such as cosine similarity become metric-dependent quantities whose values can change under coordinate transformations that leave the model function unchanged. This provides a common interpretation for several observations in the literature, including cosine-similarity instability, anisotropy in embedding spaces, and the appeal of representation comparison methods such as SVCCA and CKA. Experiments on multilayer perceptrons and convolutional networks confirm that inserting invertible transformations into trained models can substantially distort cosine similarity and nearest-neighbor structure while leaving predictions unchanged. These results indicate that analysis of neural representations should focus either on quantities that are invariant under this gauge freedom or on explicitly chosen canonical coordinates.