arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.19911cs.LGcs.CL
收藏

神经元到图:大规模解释语言模型神经元

Neuron to Graph: Interpreting Language Model Neurons at Scale

Apart Research(Apart研究院);Heriot-Watt University(赫瑞-瓦特大学);University of Edinburgh(爱丁堡大学);University of Oxford(牛津大学)

Alex Foote, Neel Nanda, Esben Kran, Ioannis Konstas, Shay Cohen, Fazl Barez

AI总结:

本文提出Neuron to Graph(N2G)工具,通过截断与显著性方法将LLM神经元行为自动转化为可解释图,实现大规模神经元解释、自动验证与相似神经元比较,并可在单个T4 GPU上扩展至6层Transformer全部神经元。

摘要:

大型语言模型(LLMs)的进展带来了卓越的能力,但其内部机制在很大程度上仍然未知。为了理解这些模型,我们需要揭示单个神经元的功能及其对网络的贡献。本文提出了一种新颖的自动化方法,旨在将可解释性技术扩展到LLMs中大量神经元上,使其更具可解释性并最终更安全。传统方法需要检查具有强神经元激活的示例,并手动识别模式以解读神经元所响应的概念。我们提出了Neuron to Graph(N2G),这是一种创新工具,可自动从神经元训练所用的数据集中提取其行为,并将其转化为可解释的图。N2G使用截断和显著性方法,仅强调对神经元最相关的token,同时用多样化的样本丰富数据集示例,以更好地涵盖神经元行为的全谱。这些图可以被可视化以辅助研究人员的手动解释,并且可以在文本上生成token激活,通过与神经元的真实激活进行比较来进行自动验证,我们利用这一点表明该模型在预测神经元激活方面优于两种基线方法。我们还展示了所生成的图表示如何被灵活地用于促进可解释性研究的进一步自动化,例如搜索具有特定属性的神经元,或以编程方式比较神经元以识别相似神经元。我们的方法可以轻松扩展,使用单个Tesla T4 GPU为6层Transformer模型中的所有神经元构建图表示,从而具有广泛的可用性。我们在https://github.com/alexjfoote/Neuron2Graph发布代码和使用说明。

英文摘要:

Advances in Large Language Models (LLMs) have led to remarkable capabilities, yet their inner mechanisms remain largely unknown. To understand these models, we need to unravel the functions of individual neurons and their contribution to the network. This paper introduces a novel automated approach designed to scale interpretability techniques across a vast array of neurons within LLMs, to make them more interpretable and ultimately safe. Conventional methods require examination of examples with strong neuron activation and manual identification of patterns to decipher the concepts a neuron responds to. We propose Neuron to Graph (N2G), an innovative tool that automatically extracts a neuron's behaviour from the dataset it was trained on and translates it into an interpretable graph. N2G uses truncation and saliency methods to emphasise only the most pertinent tokens to a neuron while enriching dataset examples with diverse samples to better encompass the full spectrum of neuron behaviour. These graphs can be visualised to aid researchers' manual interpretation, and can generate token activations on text for automatic validation by comparison with the neuron's ground truth activations, which we use to show that the model is better at predicting neuron activation than two baseline methods. We also demonstrate how the generated graph representations can be flexibly used to facilitate further automation of interpretability research, by searching for neurons with particular properties, or programmatically comparing neurons to each other to identify similar neurons. Our method easily scales to build graph representations for all neurons in a 6-layer Transformer model using a single Tesla T4 GPU, allowing for wide usability. We release the code and instructions for use at https://github.com/alexjfoote/Neuron2Graph.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑