参与或灭亡:算法推理中注意力的基准测试
Attend or Perish: Benchmarking Attention in Algorithmic Reasoning
AI总结:
本文提出算法基准AttentionSpan,通过五个无限输入域任务分离并追踪正确算法,分析注意力图与干预实验,揭示注意力机制直接导致Transformer外推失败。
摘要:
Transformer能否学会在先前未见过的输入/输出域上可靠地执行算法任务?尽管预训练语言模型在包含算法推理的基准上表现出稳定的准确率,但要评估这些结果的可靠性,就必须具备区分真正算法理解与记忆的能力。在本文中,我们提出了AttentionSpan,这是一个算法基准,包含五个具有无限输入域的任务,在这些任务中我们可以分离并追踪完成任务所需的正确且稳健的算法。这使我们能够评估(i)模型外推到未见输入类型的能力,包括新的长度、值域或输入域,以及(ii)评估其学习到的机制的稳健性。通过分析注意力图并进行有针对性的干预,我们表明注意力机制直接导致了外推失败。我们在https://github.com/michalspiegel/AttentionSpan上公开提供了所有任务和可解释性方法的实现。
英文摘要:
Can transformers learn to perform algorithmic tasks reliably across previously unseen input/output domains? While pre-trained language models show solid accuracy on benchmarks incorporating algorithmic reasoning, assessing the reliability of these results necessitates an ability to distinguish genuine algorithmic understanding from memorization. In this paper, we propose AttentionSpan, an algorithmic benchmark comprising five tasks of infinite input domains where we can disentangle and trace the correct, robust algorithm necessary for the task. This allows us to assess (i) models' ability to extrapolate to unseen types of inputs, including new lengths, value ranges or input domains, but also (ii)to assess the robustness of their learned mechanisms. By analyzing attention maps and performing targeted interventions, we show that attention mechanism directly causes failures in extrapolation. We make the implementation of all our tasks and interpretability methods publicly available at https://github.com/michalspiegel/AttentionSpan .
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。