Paper: 2605.15183 Authors: ML Nissen Gonzalez, Melwina Albuquerque, Laurence Wroe, Jacob Meyer Cohen, Logan Riggs Smith, Thomas Dooms Categories: cs.LG

The Gap

Mechanistic interpretability researchers want to verify that two network components implement the same computation. Existing approaches fall into two camps: behavioral metrics (comparing outputs on test data) miss out-of-distribution mechanisms, while parameter-based metrics (comparing raw weights) break when you permute neurons or apply other weight-space symmetries that don’t change the function.

The field has been stuck choosing between “blind to mechanisms” and “blind to symmetries.” For tensor-based models (MLPs, attention layers, convolutions), there’s been no way to ask: “Do these weights implement the same mathematical transformation?” while respecting that W and PW (for permutation P) can be functionally identical.

Problem: Compare two network components
   |
   v
Existing approaches split:
   |
   +---> Behavioral metrics -----> Blind to OOD mechanisms
   |                                (only see test distribution)
   |
   +---> Parameter metrics -------> Blind to symmetries
                                    (permute neurons = different)
   |
   v
Gap: Need weight-based + symmetry-aware
   |
   v
Method: Tensor similarity (recursive invariant)
   |
   v
Evidence: Tracks grokking, backdoors better than baselines
   |
   v
Conclusion: Functional equivalence becomes algebraic problem

The Increment

One sentence: Before this paper, comparing network mechanisms meant choosing between empirical approximation (behavior) or symmetry-blind comparison (raw weights); after, there’s an algebraic solution that respects weight-space structure.

Core Mechanism

Tensor similarity treats each layer as a multilinear map (a tensor) and compares them by finding the optimal alignment under all valid symmetries. For a single layer, this means: given weight matrices W₁ and W₂, find permutation matrices P and Q such that ||W₁ - P W₂ Q^T|| is minimized. The metric is the residual after optimal alignment.

For multi-layer networks, the algorithm works recursively. Start at the output layer and work backward. At each layer, the alignment from the previous layer constrains the current layer’s symmetries—if you permuted neurons in layer k, layer k-1 must respect that permutation. This captures cross-layer mechanisms: a circuit spanning multiple layers will only match if the entire computational path aligns.

The computation uses the Hungarian algorithm for optimal bipartite matching at each layer, making it polynomial-time. The result is a single scalar: zero means functionally identical (up to symmetries), larger values mean structural divergence.

Input: Two networks N1, N2
   |
   v
Layer L (output):
   W1[L], W2[L]
   |
   v
Find optimal P, Q:
   min ||W1[L] - P*W2[L]*Q^T||
   |
   v
Layer L-1:
   W1[L-1], W2[L-1]
   Constrained by Q from layer L
   |
   v
Recurse backward to input
   |
   v
Output: Scalar similarity (0 = identical)

Think of it like comparing two Rubik’s cubes. Behavioral metrics check if they produce the same colors when you apply test sequences—but miss internal mechanisms. Raw parameter comparison checks if stickers are in identical positions—but fails when one cube is rotated (a symmetry). Tensor similarity solves the cube alignment problem: it finds the rotation that makes the cubes maximally similar, then measures the remaining difference. The recursive part handles that each face’s rotation constrains adjacent faces—just as each layer’s permutation constrains neighboring layers.

Key Concepts

  • Weight-space symmetries: Neural networks have redundancy in how they represent the same function. Permuting all neurons in a hidden layer (swapping rows in one weight matrix and columns in the next) changes the parameters but not the computation. Other symmetries include scaling (multiply one layer by α, divide the next by α) and sign flips for certain activations. These symmetries form a group—compositions of symmetries are symmetries. A good similarity metric must be invariant to this group, meaning symmetric networks score as identical. Existing parameter metrics fail this: they see permuted networks as different even when functionally identical.

  • Tensor decomposition perspective: A neural network layer with weight matrix W ∈ R^(m×n) defines a bilinear map: (x, y) → x^T W y. This is a rank-2 tensor. Multi-layer networks compose these tensors. Tensor similarity leverages this structure: instead of treating weights as arbitrary arrays, it respects their multilinear nature. The alignment problem becomes: find the change of basis (permutations) that makes two tensors closest. This is why the method works recursively—tensor composition has a natural layer-by-layer structure.

  • Grokking as a case study: Grokking is when a network suddenly generalizes after long overfitting. Behavioral metrics can’t distinguish pre-grok from post-grok on training data (both fit perfectly), and test accuracy jumps discontinuously. Tensor similarity reveals the transition smoothly: the weight structure gradually aligns with the true algorithmic solution, even before test accuracy improves. This shows the metric captures mechanistic changes invisible to behavior-based approaches.

Framework Shift

Before (mainstream approach):        After (this paper):

Network 1 ---> [Test Data] <--- Network 2    Network 1 ---> [Tensor Align] <--- Network 2
                   |                                              |
                   v                                              v
            Compare outputs                              Compare aligned weights
                   |                                              |
                   v                                              v
         Empirical similarity                           Algebraic similarity
         (distribution-dependent)                       (distribution-free)
         
         Blind to:                                      Captures:
         - OOD mechanisms                               - Global function structure
         - Internal structure                           - Cross-layer circuits
                                                        - Symmetry-invariant identity

From empirical approximation to algebraic verification, the core shift is treating functional equivalence as a solved problem in multilinear algebra rather than a statistical estimation task.

Expert Assessment

Problem choice: Real gap. Mechanistic interpretability is bottlenecked by the inability to verify component equivalence—you can’t build a library of circuits if you can’t tell when two circuits are the same. The symmetry-blindness of parameter metrics is a known pain point, not a manufactured problem.

Method maturity: Elegant use of existing tools (Hungarian algorithm, tensor algebra) rather than inventing new machinery. The recursive structure is the key insight—it’s not obvious that layer-wise alignment should compose into a global metric, but the tensor perspective makes it natural. One concern: the method assumes tensor structure (linear layers), so it doesn’t directly handle normalization layers, residual connections, or other architectural quirks without extension.

Experimental integrity: Baselines are fair (CKA, linear CKA, parameter distance). The grokking and backdoor experiments are well-chosen stress tests—they probe whether the metric sees mechanistic changes invisible to behavior. Numbers look solid. Minor quibble: would like to see failure cases or adversarial examples where tensor similarity gives misleading results.

Writing quality: Abstract and intro are crisp. The recursive algorithm description (Section 3) could use a worked example—readers will struggle to visualize the constraint propagation without one. The related work section undersells how this connects to circuit discovery (Olah et al.) and modular arithmetic grokking (Power et al.)—those connections would strengthen the motivation.

Verdict: strong accept — Solves a real problem with a principled method, strong empirical validation, and immediate utility for interpretability research.

Takeaways

If you’re comparing learned representations (not just in neural nets—think matrix factorizations, tensor decompositions, any parameterized multilinear map), steal the alignment-before-comparison principle. Don’t compare raw parameters; find the symmetry group, align optimally, then measure residuals.

For interpretability practitioners: this gives you a way to build circuit libraries. Train multiple networks on the same task, extract suspected circuits, use tensor similarity to cluster them. Circuits that score near-zero are mechanistically identical—you’ve found a canonical implementation.

For training dynamics researchers: tensor similarity tracks mechanistic phase transitions (like grokking) that behavioral metrics miss. Use it as a diagnostic: if weights are changing but tensor similarity to the final solution isn’t decreasing, you’re in a plateau.

The recursive constraint propagation trick generalizes beyond neural nets. Any hierarchical system where local symmetries compose (think: modular code with interface constraints, hierarchical Bayesian models) can use this pattern—align top-down, propagating constraints from parent to child.

论文: 2605.15183 作者: ML Nissen Gonzalez, Melwina Albuquerque, Laurence Wroe, Jacob Meyer Cohen, Logan Riggs Smith, Thomas Dooms 分类: cs.LG

缺口

机制可解释性研究者想验证两个网络组件是否实现了相同的计算。

现有方法分两派:行为度量(比较测试数据上的输出)会漏掉分布外的机制,而参数度量(比较原始权重)在你置换神经元或应用其他不改变函数的权重空间对称变换时就失效了。

该领域一直在”对机制盲目”和”对对称性盲目”之间二选一。

对于基于张量的模型(MLP、注意力层、卷积),一直没有办法问:“这些权重是否实现了相同的数学变换?“同时尊重 W 和 PW(P 是置换矩阵)在功能上可以完全相同这一事实。

问题:比较两个网络组件
   |
   v
现有方法分裂:
   |
   +---> 行为度量 -----> 对分布外机制盲目
   |                    (只看测试分布)
   |
   +---> 参数度量 -----> 对对称性盲目
                        (置换神经元 = 不同)
   |
   v
缺口:需要基于权重 + 对称性感知
   |
   v
方法:张量相似度(递归不变量)
   |
   v
证据:比基线更好地追踪顿悟、后门
   |
   v
结论:功能等价变成代数问题

增量

一句话: 这篇论文之前,比较网络机制意味着在经验近似(行为)或对称性盲目比较(原始权重)之间二选一;之后,有了一个尊重权重空间结构的代数解。

核心机制

张量相似度把每一层视为多线性映射(一个张量),通过在所有有效对称性下找到最优对齐来比较它们。

对于单层,这意味着:给定权重矩阵 W₁ 和 W₂,找置换矩阵 P 和 Q 使得 ||W₁ - P W₂ Q^T|| 最小化。

度量就是最优对齐后的残差。

对于多层网络,算法递归工作。

从输出层开始向后。

在每一层,前一层的对齐约束当前层的对称性——如果你在第 k 层置换了神经元,第 k-1 层必须尊重那个置换。

这捕获了跨层机制:跨越多层的电路只有在整个计算路径对齐时才会匹配。

计算在每层使用匈牙利算法进行最优二分匹配,使其成为多项式时间。

结果是单个标量:零表示功能相同(在对称性范围内),更大的值表示结构分歧。

输入:两个网络 N1, N2
   |
   v
层 L(输出):
   W1[L], W2[L]
   |
   v
找最优 P, Q:
   min ||W1[L] - P*W2[L]*Q^T||
   |
   v
层 L-1:
   W1[L-1], W2[L-1]
   受层 L 的 Q 约束
   |
   v
向输入递归
   |
   v
输出:标量相似度(0 = 相同)

把它想象成比较两个魔方。

行为度量检查当你应用测试序列时它们是否产生相同的颜色——但会漏掉内部机制。

原始参数比较检查贴纸是否在相同位置——但当一个魔方旋转时(一个对称性)就失败了。

张量相似度解决魔方对齐问题:它找到使魔方最大相似的旋转,然后测量剩余差异。

递归部分处理每个面的旋转约束相邻面——就像每层的置换约束相邻层一样。

关键概念

  • 权重空间对称性: 神经网络在如何表示相同函数上有冗余。

置换隐藏层中的所有神经元(交换一个权重矩阵中的行和下一个中的列)改变参数但不改变计算。

其他对称性包括缩放(将一层乘以 α,将下一层除以 α)和某些激活的符号翻转。

这些对称性形成一个群——对称性的组合是对称性。

好的相似度度量必须对这个群不变,意味着对称网络得分相同。

现有参数度量在这方面失败:它们将置换网络视为不同,即使功能相同。

  • 张量分解视角: 具有权重矩阵 W ∈ R^(m×n) 的神经网络层定义双线性映射:(x, y) → x^T W y。

这是一个秩-2 张量。

多层网络组合这些张量。

张量相似度利用这种结构:它不是将权重视为任意数组,而是尊重它们的多线性性质。

对齐问题变成:找到使两个张量最接近的基变换(置换)。

这就是为什么该方法递归工作——张量组合有自然的逐层结构。

  • 顿悟作为案例研究: 顿悟是指网络在长时间过拟合后突然泛化。

行为度量无法在训练数据上区分顿悟前和顿悟后(两者都完美拟合),测试准确率不连续跳跃。

张量相似度平滑地揭示转变:权重结构逐渐与真实算法解对齐,甚至在测试准确率提高之前。

这表明该度量捕获了基于行为的方法看不见的机制变化。

框架转变

之前(主流方法):                之后(本文方法):

网络1 ---> [测试数据] <--- 网络2    网络1 ---> [张量对齐] <--- 网络2
              |                                   |
              v                                   v
        比较输出                            比较对齐权重
              |                                   |
              v                                   v
      经验相似度                              代数相似度
      (依赖分布)                            (无关分布)
      
      盲目于:                                捕获:
      - 分布外机制                            - 全局函数结构
      - 内部结构                              - 跨层电路
                                              - 对称不变恒等

从经验近似到代数验证,核心转变是将功能等价视为多线性代数中的已解问题,而非统计估计任务。

专家评审

选题眼光: 真缺口。

机制可解释性被无法验证组件等价性所瓶颈——如果你无法判断两个电路何时相同,就无法构建电路库。

参数度量的对称性盲目是已知痛点,不是人造问题。

方法成熟度: 优雅地使用现有工具(匈牙利算法、张量代数)而非发明新机制。

递归结构是关键洞见——逐层对齐应该组合成全局度量并不明显,但张量视角使其自然。

一个担忧:该方法假设张量结构(线性层),因此不直接处理归一化层、残差连接或其他架构特性,需要扩展。

实验诚意: 基线公平(CKA、线性 CKA、参数距离)。

顿悟和后门实验是精心选择的压力测试——它们探测度量是否看到行为看不见的机制变化。

数字看起来扎实。

小瑕疵:希望看到失败案例或对抗样本,其中张量相似度给出误导性结果。

写作功力: 摘要和引言简洁。

递归算法描述(第3节)可以用一个完整示例——读者没有示例会难以可视化约束传播。

相关工作部分低估了这与电路发现(Olah 等)和模算术顿悟(Power 等)的联系——这些联系会加强动机。

判决: 强接收 — 用原则性方法解决真实问题,强实证验证,对可解释性研究有直接效用。

要点总结

如果你在比较学习表示(不仅在神经网络中——想想矩阵分解、张量分解、任何参数化多线性映射),偷走对齐后比较原则。

不要比较原始参数;找到对称群,最优对齐,然后测量残差。

对于可解释性实践者:这给你一种构建电路库的方法。

在同一任务上训练多个网络,提取疑似电路,使用张量相似度聚类它们。

得分接近零的电路在机制上相同——你找到了规范实现。

对于训练动力学研究者:张量相似度追踪行为度量漏掉的机制相变(如顿悟)。

将其用作诊断:如果权重在变化但到最终解的张量相似度没有减少,你处于平台期。

递归约束传播技巧泛化到神经网络之外。

任何局部对称性组合的层次系统(想想:具有接口约束的模块化代码、层次贝叶斯模型)都可以使用这种模式——自顶向下对齐,从父到子传播约束。