Shared DIFF Transformer

Yueyang Cang, Yuhang Liu, Xiaoteng Zhang, Li Shi, Wenge Que
1/29/2025
cs.LG

No confident code implementation found for this paper.

Abstract

DIFF Transformer improves attention allocation by enhancing focus on relevant context while suppressing noise. It introduces a differential attention mechanism that calculates the difference between two independently generated attention distributions, effectively reducing noise and promoting sparse attention patterns. However, the independent signal generation in DIFF Transformer results in parameter redundancy and suboptimal utilization of information. In this work, we propose Shared DIFF Transformer, which draws on the idea of a differential amplifier by introducing a shared base matrix to model global patterns and incorporating low-rank updates to enhance task-specific flexibility. This design significantly reduces parameter redundancy, improves efficiency, and retains strong noise suppression capabilities. Experimental results show that, compared to DIFF Transformer, our method achieves better performance in tasks such as long-sequence modeling, key information retrieval, and in-context learning. Our work provides a novel and efficient approach to optimizing differential attention mechanisms and advancing robust Transformer architectures.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{cang2025shared,
  title  = {Shared DIFF Transformer},
  author = {Yueyang Cang and Yuhang Liu and Xiaoteng Zhang and Li Shi and Wenge Que},
  year   = {2025},
  eprint = {2501.17900},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.17900v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.17900.svg)](https://codeofpaper.com/paper/2501.17900)

Discussion