给定语言模型生成的标记序列,我们可能需要识别影响模型生成该序列的前置标记。执行此类标记归因成本高昂;常用方法是消融前置标记并直接测量其影响。为降低标记归因成本,我们重新将注意力权重视为语言模型如何使用先前标记的启发式指标。研究发现,用注意力归因模型行为的朴素方法(如跨注意力头平均注意力权重以估计标记的影响)不可靠。为获得忠实的归因,我们提出将不同注意力头的注意力权重视为特征。这样,我们就能学习如何有效利用注意力权重进行归因(使用消融信号)。我们提出的方法Attribution with Attention(AT2)性能与涉及大量消融的方法相当,同时效率显著提高。为展示AT2的实用性,我们在问答场景中用它修剪提供上下文的次要部分,提升了回答质量。我们在https://github.com/MadryLab/AT2提供AT2的代码。
英文摘要:
Given a sequence of tokens generated by a language model, we may want to identify the preceding tokens that influence the model to generate this sequence. Performing such token attribution is expensive; a common approach is to ablate preceding tokens and directly measure their effects. To reduce the cost of token attribution, we revisit attention weights as a heuristic for how a language model uses previous tokens. Naive approaches to attribute model behavior with attention (e.g., averaging attention weights across attention heads to estimate a token's influence) have been found to be unreliable. To attain faithful attributions, we propose treating the attention weights of different attention heads as features. This way, we can learn how to effectively leverage attention weights for attribution (using signal from ablations). Our resulting method, Attribution with Attention (AT2), reliably performs on par with approaches that involve many ablations, while being significantly more efficient. To showcase the utility of AT2, we use it to prune less important parts of a provided context in a question answering setting, improving answer quality. We provide code for AT2 at https://github.com/MadryLab/AT2 .
Peking University(北京大学);Microsoft Research(微软研究院);Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);ETH Zurich(苏黎世联邦理工学院);Tsinghua University(清华大学)
Fine-Grained Fashion Similarity Learning by Attribute-Specific Embedding Network
Zhejiang University(浙江大学);Zhejiang Gongshang University(浙江工商大学);Alibaba-Zhejiang University Joint Institute of Frontier Technologies(阿里巴巴-浙江大学前沿技术联合研究院);Alibaba Group(阿里巴巴集团)
Att2CPC: Attention-Guided Lossy Attribute Compression of Point Clouds
College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics(南京航空航天大学计算机科学与技术学院);School of Computing and Mathematics, Charles Sturt University(查尔斯斯特大学计算与数学学院)
Mutually Causal Semantic Distillation Network for Zero-Shot Learning
Huazhong University of Science and Technology(华中科技大学);National Anti-Counterfeit Engineering Research Center(国家防伪工程技术研究中心);Nanjing University of Science and Technology(南京理工大学)
School of Computer Science and Technology, Huazhong University of Science and Technology(华中科技大学计算机科学与技术学院);Hopcroft Center on Computing Science, Huazhong University of Science and Technology(华中科技大学计算科学霍普克罗夫特中心);Department of Computer Science, Cornell University(康奈尔大学计算机科学系)