Abstract: Self-attention shows outstanding competence in capturing long-range relationships while enhancing performance on vision tasks, such as image classification and image captioning. However, the self-attention module highly relies on the dot product multiplication and dimension alignment among query-key-value features, which cause two problems: (1) The dot product multiplication results in exhaustive and redundant computation. (2) Due to the visual feature map often appearing as a multi-dimensional tensor, reshaping the scale of the tensor feature to adapt to the dimension alignment might destroy the internal structure of the tensor feature map. To address these problems, this paper proposes a self-attention plug-in module with its variants, namely, Synthesizing Tensor Transformations (STT), for directly processing image tensor features. Without computing the dot-product multiplication among query-key-value, the basic STT is composed of the tensor transformation to learn the synthetic attention weight from visual information. The effectiveness of STT series is validated on the image classification and image caption. Experiments show that the proposed STT achieves competitive performance while keeping robustness compared to self-attention based above vision tasks.
Introduction
Standard self-attention mechanisms, the core of the Transformer architecture, have revolutionized computer vision. However, their reliance on the dot product between "Query" and "Key" features presents significant hurdles. First, pairwise dot products lead to exhaustive and often redundant computational overhead. Second, to perform these matrix operations, 3D image tensors (Height $\times$ Width $\times$ Channels) are typically flattened into 2D matrices. This "unrolling" process can destroy the inherent spatial structure and multi-dimensional relationships of the image feature map.
This paper introduces Synthesizing Tensor Transformations (STT), a plug-in module designed to replace traditional dot-product self-attention with learnable synthetic weights that operate directly on image tensors.
Methodology: From Dot-Product to Synthesizers
The core innovation lies in moving away from content-based token-to-token similarity. Instead of calculating how much every pixel relates to every other pixel via dot products, the researchers propose using Visual Dense Synthesizing (VDS) and its variants.
As shown in the figure above, while standard attention (a) computes interactions between Query and Key, the Dense Synthesizer (b) learns a synthetic attention map directly from the input. The Random Synthesizer (c) takes this further by using a task-specific, randomly initialized matrix, suggesting that global alignment can often be as effective as content-dependent alignment.
Synthesizing Tensor Transformations (STT)
To preserve the "tensor-ness" of visual data, STT utilizes n-mode tensor products (specifically Kronecker products). Instead of a single massive attention matrix, STT employs three smaller matrices ($A_H, A_W, A_C$) to transform the input tensor along its height, width, and channel dimensions independently.
This factorization, often implemented via Kronecker decomposition, allows the model to produce attention weights that respect the spatial and channel-wise structure of the image while significantly reducing the number of parameters and computational complexity.
Experimental Results
The STT series was evaluated on CIFAR-10 for classification and COCO-2014 for image captioning.
Robustness and Resilience
One of the most significant findings is STT's resilience to perturbations. Because it does not rely on precise token-to-token matching—which is easily disrupted by noise—it maintains high performance under stress:
- Gaussian Noise: On CIFAR-10 with 0.1 variance noise, STT achieved 19.54% accuracy, outperforming standard Transformers (14.8%) and CNN baselines (13.76%).
- Rotation: STT variants (STTH and STTW) showed superior accuracy compared to Transformers when images were rotated, as their full-rank attention maps better capture global spatial context.
Image Captioning
On the COCO dataset, the Mixture Synthesizer (MS)—which combines different synthesizer types—outperformed both LSTM and Transformer baselines. It achieved a CIDEr score of 1.2104, a substantial improvement over the standard Transformer's 0.7970.
Conclusion
Synthesizing Tensor Transformations offer a robust and efficient alternative to traditional self-attention for vision tasks. By avoiding the destructive flattening of tensors and the redundancy of dot-product calculations, STT preserves spatial structures and enhances model resilience. Future work will focus on optimizing the balance between parameter reduction (via decomposition rank) and the preservation of fine-grained visual information.
Summary updated