arXiv:2412.02919cs.LGcs.AI2024-12被引 1

提出新型张量注意力机制,高效处理高维多维数据。

Higher-Order Transformers With Kronecker-Structured Attention

  • 用克罗内克积分解注意力,保留张量结构
  • 在2D/3D数据上性能媲美传统方法,成本大幅降低
  • 适合处理时间序列、图像等多维数据,结果可解释

现代数据日益高维且多维,常以多索引变量的张量形式表示。尽管Transformer在序列建模和高维任务中表现优异,但直接应用于多维数据时因点积注意力的二次计算开销及输入展平破坏张量结构与跨维度依赖,导致计算成本过高。本文提出高阶Transformer(HOT),一种新的因子化注意力框架,将多维注意力表示为克罗内克积之和或各模态注意力矩阵之和。HOT能有效捕捉跨维度的稠密与稀疏关系,同时保持张量结构。理论上,HOT保留了完整高阶注意力的表达能力,并可通过因子化秩控制复杂度。在2D与3D数据上的实验表明,HOT在多变量时间序列预测与图像分类任务中达到竞争性性能,同时显著降低计算与内存开销。模式注意力矩阵的可视化进一步揭示了HOT学习到的可解释高阶依赖关系,证明其在多个领域处理复杂多维数据的通用性。方法实现已公开于https://github.com/s-omranpour/HOT。

原文摘要 · Abstract (English)

Modern datasets are increasingly high-dimensional and multiway, often represented as tensor-valued data with multi-indexed variables. While Transformers excel in sequence modeling and high-dimensional tasks, their direct application to multiway data is computationally prohibitive due to the quadratic cost of dot-product attention and the need to flatten inputs, which disrupts tensor structure and cross-dimensional dependencies. We propose the Higher-Order Transformer (HOT), a novel factorized attention framework that represents multiway attention as sums of Kronecker products or sums of mode-wise attention matrices. HOT efficiently captures dense and sparse relationships across dimensions while preserving tensor structure. Theoretically, HOT retains the expressiveness of full high-order attention and allows complexity control via factorization rank. Experiments on 2D and 3D datasets show that HOT achieves competitive performance in multivariate time series forecasting and image classification, with significantly reduced computational and memory costs. Visualizations of mode-wise attention matrices further reveal interpretable high-order dependencies learned by HOT, demonstrating its versatility for complex multiway data across diverse domains. The implementation of our proposed method is publicly available at https://github.com/s-omranpour/HOT.

张量建模注意力机制高维数据效率优化

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