paper-with-me

홈 › Papers

Horizontal and Vertical Attention in Transformers

2022-07-10 · Litao Yu, Jian Zhang

Transformers are built upon multi-head scaled dot-product attention and positional encoding, which aim to learn the feature representations and token dependencies. In this work, we focus on enhancing the distinctive representation by learning to augment the feature maps with the self-attention mechanism in Transformers. Specifically, we propose the horizontal attention to re-weight the multi-head output of the scaled dot-product attention before dimensionality reduction, and propose the vertical attention to adaptively re-calibrate channel-wise feature responses by explicitly modelling inter-dependencies among different channels. We demonstrate the Transformer models equipped with the two attentions have a high generalization capability across different supervised learning tasks, with a very minor additional computational cost overhead. The proposed horizontal and vertical attentions are highly modular, which can be inserted into various Transformer models to further improve the performance. Our code is available in the supplementary material.

📄 PDF Abstract BibTeX arXiv:2207.04399

Code (0)

등록된 구현이 없습니다.

Tasks

Dimensionality Reduction

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Position-Wise Feed-Forward Layer 설명 없음
Residual Connection 설명 없음

Similar Papers 제목 키워드 기반

Deductive Logic in Language Models: Horizontal vs Vertical Reasoning

2025-10-10 · Davide Maltoni, Matteo Ferrara arxiv

Recent language models exhibit significant logical reasoning abilities, yet the mechanisms supporting deductive inference remain poorly understood. This paper studies small transformer-based language models trained from …

Logical ReasoningDecision Making

Full-bandwidth transformer

2026-08-09 · Xi Wang, Ziyang Cai, Zheng Zhan, Harry Dong 외 hf

Autoregressive transformers compute along two axes: horizontally across generated tokens, and vertically through model depth. Dense attention gives each token broad horizontal access to the past, but the vertical feedbac…

Axially Expanded Windows for Local-Global Interaction in Vision Transformers

2022-09-19 · Zhemin Zhang, Xun Gong

Recently, Transformers have shown promising performance in various vision tasks. A challenging issue in Transformer design is that global self-attention is very expensive to compute, especially for the high-resolution vi…

Simultaneous Recognition of Horizontal and Vertical Text in Natural Images

2018-12-06 · Chankyu Choi, Youngmin Yoon, Junsu Lee, Jun-Seok Kim

Recent state-of-the-art scene text recognition methods have primarily focused on horizontal text in images. However, in several Asian countries, including China, large amounts of text in signs, books, and TV commercials …

Scene Text Recognition

Spiral RoPE: Rotate Your Rotary Positional Embeddings in the 2D Plane

2026-02-03 · Haoyu Liu, Sucheng Ren, Tingyu Zhu, Peng Wang 외 arxiv

Rotary Position Embedding (RoPE) is the de facto positional encoding in large language models due to its ability to encode relative positions and support length extrapolation. When adapted to vision transformers, the sta…