‹ 返回 2026-06-19

Bag of Dims:通过维度级符号模式实现无需训练的机制可解释性

Bag of Dims: Training-Free Mechanistic Interpretability via Dimension-Level Sign Patterns

▲ 1 💬 1 2026-06-19

Varun Reddy Nalagatla

摘要

我们指出,Transformer隐藏状态的标准基向量本身就提供了一种无需训练、适用于所有架构的特征基础。各个维度通过其符号(+/-1)来编码语义内容,而其数值则代表置信度,它们相当于独立的二进制标记;一个特征就是那些具有一致符号模式的维度子集,其判断方式是通过统计符号的一致性来实现,无需任何旋转操作。我们在七种模型中验证了这种“维度包”框架的有效性,这些模型包括语言模型(Qwen 3.5-4B、Gemma 3-4B、Mistral 7B、Qwen3-32B)、视觉模型(DINOv2、ViT-Base)以及音频模型(AST)。 单个符号本身就包含预测信息:单位数值的符号模式能够保持60-93%的Top-5下一个词准确率,而无需解码器的Hamming评分则可达80-90%的Top-4096准确率。在单个词缓存中(每个词只进行一次前向传播,没有上下文或标签),通过符号一致性可以识别出175种类别,其AUC值在0.97到0.99之间;而经过训练的探针则只会增加0.018的AUC值,且权重会趋于与坐标轴平行的状态。这些特征具有因果关系:它们能够抵抗K/V注意力机制的影响,源自FFN神经元的组合作用(随机权重控制无法再现这种效果),而在实际前向传播过程中改变某个特征的符号,就会使其概念在四个语言模型中消失,而该特征的数值则保持不变。这些维度在整个过程中保持独立性(成对互信息低于0.006比特)。 这种结构并非仅限于语言领域:相同的符号模式也出现在自监督视觉任务中(如DINOv2、ImageNet的9/12个类别)、监督视觉任务中(如ViT-Base、11/12个类别)以及音频任务中(如AST的50/50 ESC-50类别)。因此,它反映了Transformer训练的一般特性,而非特定于语言建模的目标。标准基向量就足以在单次前向传播中用于特征提取,无需优化或使用GPU资源。现在需要解决的难题是确定每个维度所编码的内容,而不是找到合适的旋转方式。

English Abstract

We show the standard basis of transformer hidden states already provides a training-free, architecture-general feature basis. Individual dimensions encode semantic content via their signs (+/-1) and confidence via their magnitudes, acting as independent binary registers; a feature is a subset of dimensions with a consistent sign pattern, read by counting sign agreements with no learned rotation. We validate this Bag of Dims framework across seven models spanning language (Qwen 3.5-4B, Gemma 3-4B, Mistral 7B, Qwen3-32B), vision (DINOv2, ViT-Base), and audio (AST). Signs alone carry predictive content: unit-magnitude sign patterns preserve 60-93% top-5 next-token accuracy through the LM head, and decoder-free Hamming scoring reaches 80-90% top-4096. From a single-token cache (one forward pass per token, no context, no labels), we detect 175 categories at AUC 0.97-0.99 by sign agreement; a trained probe adds only +0.018 AUC and converges to axis-aligned weights. These features are causally operative: they survive the K/V attention projections, trace to the FFN neuron coalitions that write them (random-weight controls never reproduce this), and flipping a feature's signs during the live forward pass suppresses its concept across four language models, magnitude-matched and concept-specific. Dimensions stay independent throughout (pairwise mutual information below 0.006 bits). The structure is not specific to language: the same per-dimension signs appear in self-supervised vision (DINOv2, 9/12 ImageNet superclasses), supervised vision (ViT-Base, 11/12), and audio (AST, 50/50 ESC-50 categories), so it reflects transformer training in general, not the language-modeling objective. The standard basis already suffices for feature reading at one forward pass, no optimization, no GPU-days. The open problem shifts from finding the right rotation to cataloging what each dimension encodes.