Higher-Order Transformers With Kronecker-Structured Attention
Soroush Omranpour, Guillaume Rabusseau, Reihaneh Rabbany
TL;DR
Higher-Order Transformer (HOT) introduces a Kronecker-structured attention mechanism to model multiway tensor data without flattening, reducing the quadratic bottleneck of standard self-attention. By decomposing the attention into mode-wise components via Kronecker products or sums, HOT preserves tensor structure and enables scalable modeling with a controllable rank parameter, while maintaining expressiveness relative to full high-order attention. The paper provides theoretical results on stable rank and a universality guarantee: any high-order attention can be approximated as a sum of Kronecker products with increasing rank, and analyzes complexity bounds of $O(D ( extstyle ext{sum}_i N_i) extstyleig( extstyle ext{prod}_j N_jig))$ per layer. Empirically, HOT achieves competitive or state-of-the-art performance on multivariate time-series forecasting, 3D medical image classification, and multispectral image segmentation, with substantially reduced memory and FLOPs and interpretable mode-wise attention maps. These results suggest HOT as a practical, efficient framework for learning complex cross-dimensional dependencies in high-dimensional data across diverse domains.
Abstract
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.
