本文提出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.
The Devil is in the Neurons: Interpreting and Mitigating Social Biases in Pre-trained Language Models
Chinese University of Hong Kong(香港中文大学);Peking University(北京大学);National University of Singapore(新加坡国立大学);Microsoft Research(微软研究院);IBM Research(IBM研究院)
NeuronScope: A Multi-Agent Framework for Explaining Polysemantic Neurons in Language Models
Wuhan University(武汉大学);Hong Kong Baptist University(香港 Baptist大学);New Jersey Institute of Technology(新泽西理工学院);The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳))
It's not Rocket Science : Interpreting Figurative Language in Narratives
Columbia University(哥伦比亚大学);Allen Institute for Artificial Intelligence(艾伦人工智能研究所);University of Washington(华盛顿大学);University of British Columbia(不列颠哥伦比亚大学)
Cross-Model Comparative Loss for Enhancing Neuronal Utility in Language Understanding
CAS Key Laboratory of AI Security, Institute of Computing Technology, CAS(中国科学院人工智能安全重点实验室 中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);Institute for AI Industry Research, Tsinghua University(清华大学人工智能产业研究院)
One Mind, Many Tongues: A Deep Dive into Language-Agnostic Knowledge Neurons in Large Language Models
Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院)
Analyzing Individual Neurons in Pre-trained Language Models
Qatar Computing Research Institute(卡塔尔计算研究所);HBKU Research Complex(哈马德·本·哈利法大学研究中心);MIT Computer Science and Artificial Intelligence Laboratory(麻省理工学院计算机科学与人工智能实验室)
From Neurons to Semantics: Evaluating Cross-Linguistic Alignment Capabilities of Large Language Models via Neurons Alignment
School of Informatics, Xiamen University(厦门大学信息学院);Institute of Artificial Intelligence, Xiamen University(厦门大学人工智能学院);Key Laboratory of Digital Protection and Intelligent Processing of Intangible Cultural Heritage of Fujian and Taiwan (Xiamen University), Ministry of Culture and Tourism(福建省和台湾非物质文化遗产数字化保护与智能处理重点实验室(厦门大学),文化和旅游部)
Language-Specific Neurons: The Key to Multilingual Capabilities in Large Language Models
Microsoft Research Asia(微软亚洲研究院);Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);School of Information, Renmin University of China(中国人民大学信息学院)
MNAFT: modality neuron-aware fine-tuning of multimodal large language models for image translation
School of Computer Science and Technology, Tianjin University, Tianjin, China(天津大学计算机科学与技术学院);School of Software, Tsinghua University, Beijing, China(清华大学软件学院);School of Information Resource Management, Renmin University of China,Beijing, China(中国人民大学信息资源管理学院);School of Artificial Intelligence, Shanghai Jiao Tong University, Shanghai, China(上海交通大学人工智能学院);Baidu Inc., Beijing, China(百度公司)
NeuPAT: Neuron-aware Plasticity Allocation Tuning for Language-Preserving MLLMs
College of Intelligent Robotics and Advanced Manufacturing, Fudan University(复旦大学智能机器人与先进制造学院);Zhongguancun Academy(中关村学院);Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);Tianjin University(天津大学);Nankai University(南开大学)