ACL 2025long0 citations

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

Chuanyang Zheng, Yihang Gao, Han Shi, Jing Xiong, Jiankai Sun, Jingyao Li, Minbin Huang, Xiaozhe Ren

Abstract

The attention mechanism is a fundamental component of the Transformer model, contributing to interactions among distinct tokens. 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**, which is called Convolutional Data-Adaptive Position Encoding (CDAPE).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.

BibTeX
@inproceedings{zheng-etal-2025-dape,
    title = "{DAPE} V2: Process Attention Score as Feature Map for Length Extrapolation",
    author = "Zheng, Chuanyang  and
      Gao, Yihang  and
      Shi, Han  and
      Xiong, Jing  and
      Sun, Jiankai  and
      Li, Jingyao  and
      Huang, Minbin  and
      Ren, Xiaozhe  and
      Ng, Michael  and
      Jiang, Xin  and
      Li, Zhenguo  and
      Li, Yu",
    editor = "Che, Wanxiang  and
      Nabende, Joyce  and
      Shutova, Ekaterina  and
      Pilehvar, Mohammad Taher",
    booktitle = "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = jul,
    year = "2025",
    address = "Vienna, Austria",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2025.acl-long.522/",
    doi = "10.18653/v1/2025.acl-long.522",
    pages = "10628--10666",
    ISBN = "979-8-89176-251-0"
}
DAPE V2: Process Attention Score as Feature Map for Length Extrapolation · ACL 2025