用线性位置偏置改进Transformer,小模型生成分子构象更优
A standard transformer and attention with linear biases for molecular conformer generation
- 引入相对位置编码作为线性注意力偏置,按节点距离调整注意力
- 2500万参数模型在GEOM-DRUGS上超越6400万参数的现有最优模型
- 适合需高效生成分子构象的药物研发人员使用
采样低能量分子构象是药物发现与优化中诸多计算的关键任务。以往研究多采用专用等变网络从二维分子图生成构象。近年来,非等变Transformer模型因可扩展性强而成为可行替代方案,但其通常需更大模型规模以弥补缺乏等变性偏差的不足。本文证明,合理的位置编码能有效缓解这一问题。采用相对位置编码的标准化Transformer模型,在参数量仅为2500万时,已超越当前非等变基线模型(6400万参数)在GEOM-DRUGS基准上的表现。该方法将相对位置编码实现为负注意力偏置,其值随图节点间最短路径距离线性增长,并为不同注意力头设置不同斜率,类似自然语言处理中的ALiBi技术。该架构有望成为新一代分子构象生成模型的基础。
原文摘要 · Abstract (English)
Sampling low-energy molecular conformations, spatial arrangements of atoms in a molecule, is a critical task for many different calculations performed in the drug discovery and optimization process. Numerous specialized equivariant networks have been designed to generate molecular conformations from 2D molecular graphs. Recently, non-equivariant transformer models have emerged as a viable alternative due to their capability to scale to improve generalization. However, the concern has been that non-equivariant models require a large model size to compensate the lack of equivariant bias. In this paper, we demonstrate that a well-chosen positional encoding effectively addresses these size limitations. A standard transformer model incorporating relative positional encoding for molecular graphs when scaled to 25 million parameters surpasses the current state-of-the-art non-equivariant base model with 64 million parameters on the GEOM-DRUGS benchmark. We implemented relative positional encoding as a negative attention bias that linearly increases with the shortest path distances between graph nodes at varying slopes for different attention heads, similar to ALiBi, a widely adopted relative positional encoding technique in the NLP domain. This architecture has the potential to serve as a foundation for a novel class of generative models for molecular conformations.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。