paper-with-me

홈 › Papers

DAPE V2: Process Attention Score as Feature Map for Length Extrapolation

2024-10-07 · Chuanyang Zheng, Yihang Gao, Han Shi, Jing Xiong, Jiankai Sun, Jingyao Li, Minbin Huang, Xiaozhe Ren, Michael Ng, Xin Jiang, Zhenguo Li, Yu Li

The attention mechanism is a fundamental component of the Transformer model, contributing to interactions among distinct tokens, in contrast to earlier feed-forward neural networks. In general, the attention scores are determined simply by the key-query products. However, this work's occasional trial (combining DAPE and NoPE) of including additional MLPs on attention scores without position encoding indicates that the classical key-query multiplication may limit the performance of Transformers. In this work, we conceptualize attention as a feature map and apply the convolution operator (for neighboring attention scores across different heads) to mimic the processing methods in computer vision. Specifically, the main contribution of this paper is identifying and interpreting the Transformer length extrapolation problem as a result of the limited expressiveness of the naive query and key dot product, and we successfully translate the length extrapolation issue into a well-understood feature map processing problem. The novel insight, which can be adapted to various attention-related models, reveals that the current Transformer architecture has the potential for further evolution. Extensive experiments demonstrate that treating attention as a feature map and applying convolution as a processing method significantly enhances Transformer performance.

📄 PDF Abstract BibTeX arXiv:2410.04798

Code (2)

chuanyang-zheng/dape 공식 구현 pytorch
chuanyang-zheng/cape pytorch

Methods 이 논문이 사용한 방법론

Attention 설명 없음
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…
Adam 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Residual Connection 설명 없음
Position-Wise Feed-Forward Layer 설명 없음
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…
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…

Similar Papers 제목 키워드 기반

DAPE: Data-Adaptive Positional Encoding for Length Extrapolation

2024-05-23 · Chuanyang Zheng, Yihang Gao, Han Shi, Minbin Huang 외

Positional encoding plays a crucial role in transformers, significantly impacting model performance and length generalization. Prior research has introduced absolute positional encoding (APE) and relative positional enco…

AdaPerceiver: Transformers with Adaptive Width, Depth, and Tokens

2025-11-22 · Purvish Jajal, Nick John Eliopoulos, Benjamin Shiue-Hal Chou, George K. Thiruvathukal 외 arxiv

Modern transformer architectures achieve remarkable performance across tasks and domains but remain rigid in how they allocate computation at inference time. Real-world deployment often requires models to adapt to divers…

Semantic SegmentationImage ClassificationDepth Estimation

Multi-turn RL with Structural and Performance Aware Rewards for CUDA Kernel Generation

2026-07-23 · Quazi Ishtiaque Mahmud, Nesreen K. Ahmed, Ali Jannesari arxiv

Reinforcement Learning with Verifiable Rewards (RLVR) has emerged as a powerful technique to enhance the reasoning capacity of LLMs for optimized code generation. However, existing RLVR approaches primarily rely on outco…

Reinforcement LearningCode Generation

Improving and Simplifying Pattern Exploiting Training

2021-03-22 · EMNLP 2021 11 · Derek Tam, Rakesh R Menon, Mohit Bansal, Shashank Srivastava 외

Recently, pre-trained language models (LMs) have achieved strong performance when fine-tuned on difficult benchmarks like SuperGLUE. However, performance can suffer when there are very few labeled examples available for …

Few-Shot Learning

Adaptive Perception Transformer for Temporal Action Localization

2022-08-25 · Yizheng Ouyang, Tianjin Zhang, Weibo Gu, Hongfa Wang

Temporal action localization aims to predict the boundary and category of each action instance in untrimmed long videos. Most of previous methods based on anchors or proposals neglect the global-local context interaction…

Action LocalizationTemporal Action Localization