mlsanityData to 7 Oct 2026

More Expressive Attention with Negative Weights

arXiv 2411.07176 ↗First posted 11 Nov 2024cs.CL cs.AI cs.LGcited by 9

Not on the map. Why?

Abstract (arXiv)

We propose a novel attention mechanism, named Cog Attention, that enables attention weights to be negative for enhanced expressiveness, which stems from two key factors: (1) Cog Attention enhances parameter flexibility. For example, unlike traditional softmax attention heads that use a static output-value (OV) matrix to delete or copy inputs that the heads attend to, Cog Attention naturally learns to use the sign of dynamic query-key (QK) inner products to represent these operations. This enables Cog Attention to perform multiple operations simultaneously within a single head. Meanwhile, Cog Attention's OV matrix can focus more on refinement or modification. (2) Cog Attention enhances the model's robustness against representational collapse by preventing the ``over-squashing'' of earlier tokens into later positions. We develop Transformer-like models which use Cog Attention as attention modules, including decoder-only models at various scales for language modeling and U-ViT diffusion models for image generation. Experiments show that models using Cog Attention exhibit superior performance compared to those employing traditional softmax attention modules. Our approach suggests a promising research direction for rethinking and breaking the entrenched constraints of traditional softmax attention, such as the requirement for non-negative weights.

Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 28 of its 45 references that are in the map. First posted on arXiv 11 Nov 2024.

Builds on

28 of 45 references.

References · 28

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  4. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  5. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
  6. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
  7. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  8. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  9. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
  10. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
  11. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  12. 2020GLU Variants Improve Transformercited by 1,724
16 more
  1. 2019Root Mean Square Layer Normalizationcited by 1,425
  2. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
  3. 2022All are Worth Words: A ViT Backbone for Diffusion Modelscited by 498
  4. 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Timecited by 428
  5. 2020Understanding the Difficulty of Training Transformerscited by 210
  6. 2024Transformers need glasses! Information over-squashing in language taskscited by 87
  7. 2024Spectral Filters, Dark Signals, and Attention Sinkscited by 54
  8. 2023A Study on ReLU and Softmax in Transformercited by 53
  9. 2023Replacing softmax with ReLU in Vision Transformerscited by 43
  10. 2023ResiDual: Transformer with Dual Residual Connectionscited by 30
  11. 2024When Can Transformers Count to n?cited by 22
  12. 2024Mixture of In-Context Experts Enhance LLMs' Long Context Awarenesscited by 17
  13. 2024HoPE: A Novel Positional Encoding Without Long-Term Decay for Enhanced Context Awareness and Extrapolationcited by 17
  14. 2024ConSmax: Hardware-Friendly Alternative Softmax with Learnable Parameterscited by 14
  15. 2024Mixture-of-Modules: Reinventing Transformers as Dynamic Assemblies of Modulescited by 11
  16. 2024Contextual Counting: A Mechanistic Study of Transformers on a Quantitative Taskcited by 6

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 2; 2026: 7.

9 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2022cosFormer: Rethinking Softmax in Attention
  2. 2025Softplus Attention with Re-weighting Boosts Length Extrapolation in Large Language Models
  3. 2026CARE: Covariance-Aware and Rank-Enhanced Decomposition for Enabling Multi-Head Latent Attention
  4. 2026A Provable Expressiveness Hierarchy in Hybrid Linear-Full Attention
  5. 2025See What You Are Told: Visual Attention Sink in Large Multimodal Models
  6. 2025Is Random Attention Sufficient for Sequence Modeling? Disentangling Trainable Components in the Transformer
  7. 2024Enhancing Semantic Fidelity in Text-to-Image Synthesis: Attention Regulation in Diffusion Models
  8. 2024MoH: Multi-Head Attention as Mixture-of-Head Attention