Transformer architectures have proven to learn useful representations for protein classification and generation tasks. However, these representations present challenges in interpretability. In this work, we demonstrate a set of methods for analyzing protein Transformer models through the lens of attention. We show that attention: (1) captures the folding structure of proteins, connecting amino acids that are far apart in the underlying sequence, but spatially close in the three-dimensional structure, (2) targets binding sites, a key functional component of proteins, and (3) focuses on progressively more complex biophysical properties with increasing layer depth. We find this behavior to be consistent across three Transformer architectures (BERT, ALBERT, XLNet) and two distinct protein datasets. We also present a three-dimensional visualization of the interaction between attention and protein structure. Code for visualization and analysis is available at https://github.com/salesforce/provis.
翻译:事实证明,变形器结构在蛋白质分类和生成任务方面已经学会了有用的表述方法。然而,这些表述方法在解释方面提出了挑战。在这项工作中,我们展示了通过关注镜头分析蛋白质变异模型的一套方法。我们表明注意:(1) 捕捉蛋白的折叠结构,将在基本序列中大相径庭、但在空间上接近于三维结构的氨基酸连接在一起,(2) 目标捆绑点,蛋白质的一个关键功能组成部分,以及(3) 侧重于日益复杂的生物物理特性,并增加层深。我们发现,三种变异结构(BERT、ALBERT、XLNet)和两个不同的蛋白数据集都一致。我们还展示了注意和蛋白结构之间相互作用的三维可视化。可视化和分析守则可在https://github.com/salesforce/provis查阅。