mlsanityData to 7 Oct 2026

DA-Transformer: Distance-aware Transformer

arXiv 2010.06925 ↗First posted 14 Oct 2020cs.CLcited by 23

Not on the map. Why?

Abstract (arXiv)

Transformer has achieved great success in the NLP field by composing various advanced models like BERT and GPT. However, Transformer and its existing variants may not be optimal in capturing token distances because the position or distance embeddings used by these methods usually cannot keep the precise information of real distances, which may not be beneficial for modeling the orders and relations of contexts. In this paper, we propose DA-Transformer, which is a distance-aware Transformer that can exploit the real distance. We propose to incorporate the real distances between tokens to re-scale the raw self-attention weights, which are computed by the relevance between attention query and key. Concretely, in different self-attention heads the relative distance between each pair of tokens is weighted by different learnable parameters, which control the different preferences on long- or short-term information of these heads. Since the raw weighted real distances may not be optimal for adjusting self-attention weights, we propose a learnable sigmoid function to map them into re-scaled coefficients that have proper ranges. We first clip the raw self-attention weights via the ReLU function to keep non-negativity and introduce sparsity, and then multiply them with the re-scaled coefficients to encode real distance information into self-attention. Extensive experiments on five benchmark datasets show that DA-Transformer can effectively improve the performance of many tasks and outperform the vanilla Transformer and its several variants.

Key facts. Cited by 23 papers in the map (data through 7 Oct 2026). First posted on arXiv 14 Oct 2020.

Builds on

No reference list yet.

Built on by

Cited by year

Citing papers per year: 2021: 6; 2022: 5; 2023: 6; 2024: 2; 2025: 4.

23 papers.

Sort:

  1. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
  2. 2021Position Information in Transformers: An Overviewcited by 103
  3. 2022KERPLE: Kernelized Relative Positional Embedding for Length Extrapolationcited by 84
  4. 2021SHAPE: Shifted Absolute Position Embedding for Transformerscited by 37
  5. 2021Hi-Transformer: Hierarchical Interactive Transformer for Efficient and Effective Long Document Modelingcited by 35
  6. 2022Transformer-based Entity Typing in Knowledge Graphscited by 13
  7. 2023Towards Real-Time Panoptic Narrative Grounding by an End-to-End Grounding Networkcited by 13
  8. 2023Monotonic Location Attention for Length Generalizationcited by 9
  9. 2023Algebraic Positional Encodingscited by 9
  10. 2022Time-distance vision transformers in lung cancer diagnosis from longitudinal computed tomographycited by 8
  11. 2023Longitudinal Multimodal Transformer Integrating Imaging and Latent Clinical Signatures From Routine EHRs for Pulmonary Nodule Classificationcited by 8
  12. 2021Less is More: Pre-train a Strong Text Encoder for Dense Retrieval Using a Weak Decodercited by 7
11 more
  1. 2024Quantformer: from attention to profit with a quantitative transformer trading strategycited by 6
  2. 2024Reference Neural Operators: Learning the Smooth Dependence of Solutions of PDEs on Geometric Deformationscited by 5
  3. 2025Group Representational Position Encodingcited by 5
  4. 2021CycleTransGAN-EVC: A CycleGAN-based Emotional Voice Conversion Model with Transformercited by 4
  5. 2023LEA: Improving Sentence Similarity Robustness to Typos Using Lexical Attention Biascited by 2
  6. 2022DecBERT: Enhancing the Language Understanding of BERT with Causal Attention Maskscited by 1
  7. 2023Enhancing Multivariate Time Series Classifiers through Self-Attention and Relative Positioning Infusioncited by 1
  8. 2025PIPE: Physics-Informed Position Encoding for Alignment of Satellite Images and Time Seriescited by 1
  9. 2022User recommendation system based on MIND datasetcited by 0
  10. 2025TAU: Modeling Temporal Consistency Through Temporal Attentive U-Net for PPG Peak Detectioncited by 0
  11. 2025Spatially-informed transformers: Injecting geostatistical covariance biases into self-attention for spatio-temporal forecastingcited by 0