Reproduce “Dual Attention Residuals” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Xingda Yu, Yining Li, Xinzhang Liu, Zhihao Yang, Haowei He, Chao Wang, Yongxiang Li, Shuangyong Song

Dual Attention Residuals (DAR) augments Transformer residual pathways with two interacting streams: each stream uses the other to identify useful historical depths while retrieving content from its own history. Across dense and sparse language models, DAR lowers validation loss and improves several benchmarks over standard residuals and Attention Residuals, although it incurs additional memory use and lower throughput.

Key insights

  • Reciprocal cross-stream addressing with self-stream values performs better than independently retrieving from each stream or simply adding value projections to single-stream Attention Residuals.
  • Representation analyses show that DAR maintains more distinct, complementary streams, whereas some alternatives develop greater cross-stream redundancy or stream imbalance.
  • Retrieval granularity matters with scale: Block DAR is strongest in smaller models, while Full DAR becomes preferable at 0.5B parameters.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.