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

AtMan:通过内存高效的注意力操纵理解 Transformer 预测

AtMan: Understanding Transformer Predictions Through Memory Efficient Attention Manipulation

Aleph Alpha(阿列夫阿尔法);Technical University Darmstadt(达姆施塔特工业大学);Hessian Center for Artificial Intelligence (hessian.AI)(黑森州人工智能中心);German Center for Artificial Intelligence (DFKI)(德国人工智能研究中心);LAION

Björn Deiseroth, Mayukh Deb, Samuel Weinbach, Manuel Brack, Patrick Schramowski, Kristian Kersting

AI总结:

本文提出模态无关的 AtMan 解释方法,通过注意力扰动和嵌入空间余弦邻域的 token 搜索生成相关性图,在低额外内存与计算成本下优于梯度方法。

摘要:

生成式 transformer 模型正变得日益复杂,拥有大量参数,并具备处理多种输入模态的能力。当前用于解释其预测的方法非常消耗资源。最关键的是,这些方法需要高得令人难以承受的额外内存,因为它们依赖反向传播,而反向传播分配的 GPU 内存几乎是前向传播的两倍。这使得它们即使不是完全不可能,也很难在生产环境中使用。我们提出 AtMan,它几乎不增加额外成本即可为生成式 transformer 模型提供解释。具体而言,AtMan 是一种与模态无关的扰动方法,通过操纵 transformer 的注意力机制,针对输出预测为输入生成相关性图。AtMan 不使用反向传播,而是在嵌入空间中应用一种可并行的、基于 token 的余弦相似度邻域搜索方法。我们在文本和图文基准上进行的详尽实验表明,AtMan 在多项指标上优于当前最先进的基于梯度的方法,同时具有较高的计算效率。因此,AtMan 适合用于大型模型推理部署。

英文摘要:

Generative transformer models have become increasingly complex, with large numbers of parameters and the ability to process multiple input modalities. Current methods for explaining their predictions are resource-intensive. Most crucially, they require prohibitively large amounts of extra memory, since they rely on backpropagation which allocates almost twice as much GPU memory as the forward pass. This makes it difficult, if not impossible, to use them in production. We present AtMan that provides explanations of generative transformer models at almost no extra cost. Specifically, AtMan is a modality-agnostic perturbation method that manipulates the attention mechanisms of transformers to produce relevance maps for the input with respect to the output prediction. Instead of using backpropagation, AtMan applies a parallelizable token-based search method based on cosine similarity neighborhood in the embedding space. Our exhaustive experiments on text and image-text benchmarks demonstrate that AtMan outperforms current state-of-the-art gradient-based methods on several metrics while being computationally efficient. As such, AtMan is suitable for use in large model inference deployments.

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

↑