计算机科学
依赖关系(UML)
变压器
核(代数)
建筑
标量(数学)
人工智能
理论计算机科学
数学
工程类
电气工程
几何学
组合数学
艺术
视觉艺术
电压
作者
Haoyi Zhou,Jianxin Li,Jieqi Peng,Shuai Zhang,Shanghang Zhang
标识
DOI:10.1145/3447548.3467241
摘要
The Transformer model has benefited various real-world applications, where the self-attention mechanism with dot-products shows superior alignment ability on building long dependency. However, the pair-wisely attended self-attention limits further performance improvement on challenging tasks. To the extent of our knowledge, this is the first work to define the Triplet Attention (A3) for Transformer, which introduces triplet connections as the complementary dependency. Specifically, we define the triplet attention based on the scalar triplet product, which may be interchangeably used with the canonical one within the multi-head attention. It allows the self-attention mechanism to attend to diverse triplets and capture complex dependency. Then, we utilize the permuted formulation and kernel tricks to establish a linear approximation to A3. The proposed architecture could be smoothly integrated into the pre-training by modifying head configurations. Extensive experiments show that our methods achieve significant performance improvement on various tasks and two benchmarks.
科研通智能强力驱动
Strongly Powered by AbleSci AI