arXiv:2410.08417cs.LGstat.ML2024-10ICLR被引 33

用双线性MLP揭示权重如何构建特征,实现可解释的深度学习模型分析。

Bilinear MLPs enable weight-based mechanistic interpretability

  • 采用无逐元素非线性的双线性MLP,通过三阶张量表达层内计算。
  • 权重谱分析显示低秩结构,跨任务均具可解释性。
  • 仅凭权重即可生成对抗样本、发现过拟合、定位小模型电路。

深度神经网络中MLP的机制理解仍不清晰。现有可解释性方法能从输入数据的隐藏激活中提取特征,但难以说明权重如何构造这些特征。主要挑战在于逐元素非线性引入高阶交互,使计算路径难追踪。本文分析双线性MLP——一种无逐元素非线性的门控线性单元(GLU),性能仍具竞争力。该结构可通过三阶张量完全表示为线性操作,便于权重分析。对双线性MLP权重进行特征值分解,发现玩具任务、图像分类与语言建模中均存在可解释的低秩结构。基于此,我们直接从权重构造对抗样本、识别过拟合现象,并在小语言模型中定位计算电路。结果表明,双线性层可作为当前激活函数的可解释替代品,且基于权重的可解释性对理解深度学习模型切实可行。

原文摘要 · Abstract (English)

A mechanistic understanding of how MLPs do computation in deep neural networks remains elusive. Current interpretability work can extract features from hidden activations over an input dataset but generally cannot explain how MLP weights construct features. One challenge is that element-wise nonlinearities introduce higher-order interactions and make it difficult to trace computations through the MLP layer. In this paper, we analyze bilinear MLPs, a type of Gated Linear Unit (GLU) without any element-wise nonlinearity that nevertheless achieves competitive performance. Bilinear MLPs can be fully expressed in terms of linear operations using a third-order tensor, allowing flexible analysis of the weights. Analyzing the spectra of bilinear MLP weights using eigendecomposition reveals interpretable low-rank structure across toy tasks, image classification, and language modeling. We use this understanding to craft adversarial examples, uncover overfitting, and identify small language model circuits directly from the weights alone. Our results demonstrate that bilinear layers serve as an interpretable drop-in replacement for current activation functions and that weight-based interpretability is viable for understanding deep-learning models.

可解释性MLP结构权重分析双线性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。