arXiv:2502.20525cs.LGcs.AI2025-02被引 14

用相关高斯过程建模注意力,突破对称限制提升性能

Revisiting Kernel Attention with Correlated Gaussian Process Representation

  • 将注意力机制建模为两个相关高斯过程的交叉协方差,允许非对称注意力
  • 在多个基准任务上优于现有基于高斯过程的Transformer模型
  • 提出稀疏近似方法,使模型更具可扩展性,适合大规模序列建模

Transformer已成为序列建模的主流方法,具备顶尖性能。为理解并设计更鲁棒的Transformer模型,准确估计和校准其建模不确定性至关重要。此前工作通过高斯过程(GP)对Transformer的注意力单元进行不确定性校准,并取得显著成果。然而,这些方法需将Transformer限制在对称注意力空间,以满足GP核函数的对称性要求,从而降低了模型表示能力。为此,本文提出相关高斯过程Transformer(CGPT),其自注意力机制建模为两个相关高斯过程(CGP)之间的交叉协方差,允许注意力不对称,增强基于GP的Transformer表示能力。同时,我们推导了CGP的稀疏近似方法,提升了可扩展性。实验表明,基于CGP及稀疏CGP的Transformer在多个基准任务上均优于当前最优的基于高斯过程的Transformer模型。代码已开源:https://github.com/MinhLong210/CGP-Transformers。

原文摘要 · Abstract (English)

Transformers have increasingly become the de facto method to model sequential data with state-of-the-art performance. Due to its widespread use, being able to estimate and calibrate its modeling uncertainty is important to understand and design robust transformer models. To achieve this, previous works have used Gaussian processes (GPs) to perform uncertainty calibration for the attention units of transformers and attained notable successes. However, such approaches have to confine the transformers to the space of symmetric attention to ensure the necessary symmetric requirement of their GP's kernel specification, which reduces the representation capacity of the model. To mitigate this restriction, we propose the Correlated Gaussian Process Transformer (CGPT), a new class of transformers whose self-attention units are modeled as cross-covariance between two correlated GPs (CGPs). This allows asymmetries in attention and can enhance the representation capacity of GP-based transformers. We also derive a sparse approximation for CGP to make it scale better. Our empirical studies show that both CGP-based and sparse CGP-based transformers achieve better performance than state-of-the-art GP-based transformers on a variety of benchmark tasks. The code for our experiments is available at https://github.com/MinhLong210/CGP-Transformers.

注意力机制高斯过程不确定性校准Transformer

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。