paper-with-me

Papers

Knocking-Heads Attention

2025-10-27 · Zhanchao Zhou, Xiaodong Chen, Haoxing Chen, Zhenzhong Lan, Jianguo Li arxiv

Multi-head attention (MHA) has become the cornerstone of modern large language models, enhancing representational capacity through parallel attention heads. However, increasing the number of heads inherently weakens individual head capacity, and existing attention mechanisms - whether standard MHA or its variants like grouped-query attention (GQA) and grouped-tied attention (GTA) - simply concatenate outputs from isolated heads without strong interaction. To address this limitation, we propose knocking-heads attention (KHA), which enables attention heads to "knock" on each other - facilitating cross-head feature-level interactions before the scaled dot-product attention. This is achieved by applying a shared, diagonally-initialized projection matrix across all heads. The diagonal initialization preserves head-specific specialization at the start of training while allowing the model to progressively learn integrated cross-head representations. KHA adds only minimal parameters and FLOPs and can be seamlessly integrated into MHA, GQA, GTA, and other attention variants. We validate KHA by training a 6.1B parameter MoE model (1.01B activated) on 1T high-quality tokens. Compared to baseline attention mechanisms, KHA brings superior and more stable training dynamics, achieving better performance across downstream tasks.

📄 PDF Abstract BibTeX arXiv:2510.23052

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Directional Routing in Transformers

2026-03-16 · Kevin Taylor arxiv

We introduce directional routing, a lightweight mechanism that gives each transformer attention head learned suppression directions controlled by a shared router, at 3.9% parameter cost. We train a 433M-parameter model a…

Knock Detection in Combustion Engine Time Series Using a Theory-Guided 1D Convolutional Neural Network Approach

2022-01-18 · Andreas B. Ofner, Achilles Kefalas, Stefan Posch, Bernhard C. Geiger

This paper introduces a method for the detection of knock occurrences in an internal combustion engine (ICE) using a 1D convolutional neural network trained on in-cylinder pressure data. The model architecture was based …

CPUTime SeriesTime Series Analysis

Task-KV: Task-aware KV Cache Optimization via Semantic Differentiation of Attention Heads

2025-01-25 · Xingyang He, Jie Liu, Shaowei Chen

KV cache is a widely used acceleration technique for large language models (LLMs) inference. However, its memory requirement grows rapidly with input length. Previous studies have reduced the size of KV cache by either r…

On the weak link between importance and prunability of attention heads

2020-11-01 · EMNLP 2020 11 · Aakriti Budhraja, Madhura Pande, Preksha Nema, Pratyush Kumar 외

Given the success of Transformer-based models, two directions of study have emerged: interpreting role of individual attention heads and down-sizing the models for efficiency. Our work straddles these two streams: We ana…

Attention-Only Transformers and Implementing MLPs with Attention Heads

2023-09-15 · Robert Huben, Valerie Morris

The transformer architecture is widely used in machine learning models and consists of two alternating sublayers: attention heads and MLPs. We prove that an MLP neuron can be implemented by a masked attention head with i…