NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Laplacian Heads Improve Transformers by Smoothing Token Representations

Yuchong Zhang, Vardan Papyan

NeurIPS page · Open on the map

Category: Interpretability & Model Adaptation › Transformer Attention Theory · Type: new method · Keywords: transformer, attention heads, graph Laplacian, token smoothing, representation learning

Areas: Model Architectures & Sequence Modeling › Language Model Architectures › Attention Geometry

Summary

Laplacian Heads improves Transformers by replacing a subset of attention matrices with graph Laplacians, smoothing token representations and enhancing performance in supervised, language modeling, and self-supervised learning tasks.

Explained to a 5-year-old

A computer program reads groups of words called tokens. It normally mixes tokens together using attention, which can make them too similar or not smooth enough. The new idea adds a special smoothing step that spreads information like heat across tokens. This helps the program keep useful differences while making the overall representation clearer. As a result, the program works better on many language tasks.

Explained to a 5-year-old, longer

A computer program that reads language works with little pieces of words called tokens. These tokens are like small cards that hold information about each word. The program normally mixes these cards together using a rule called attention. This mixing can sometimes make the cards too similar, losing useful details. The new idea adds another rule that smooths the cards, similar to how heat spreads across a surface. This smoothing helps keep the important differences between tokens while making the overall picture clearer. By controlling both the average value and the spread of the tokens, the program can learn better patterns. The smoothing step also makes the tokens decay faster in complexity, which means they become simpler and more stable. When the program is trained on tasks like understanding sentences, predicting next words, or finding hidden structure, it performs better. The improvements happen without having to change the size of the model or add extra training data. This makes the program more useful for real-world applications like translation, chat, and summarizing. Overall, the smoother tokens help the program make more accurate predictions and understand language more naturally.

For a technical reader

The paper proposes Laplacian Heads, a modification to transformer attention where some heads replace the standard softmax attention matrix with its graph Laplacian. This change lets those heads directly influence the mean of token representations while others control variance, effectively performing a heat-diffusion step on the token graph. Empirical results show improved performance on supervised, language modeling, and self-supervised tasks, along with faster-decaying spectra indicating smoother token embeddings. The authors also provide theoretical insight by interpreting the update as a single diffusion step, linking attention dynamics to graph Laplacian theory. Overall, Laplacian Heads demonstrate that controlled smoothing can be beneficial, challenging the conventional view that token oversmoothing is always harmful.

Problem

Current transformer attention updates token representations without directly controlling their mean and variance, leading to potential oversmoothing or insufficient smoothing that limits representation quality. This makes it difficult to balance token similarity and diversity across tasks.

Method

The approach modifies the attention update by replacing some attention matrices with their graph Laplacians, allowing heads to adjust token means while others control variance, effectively performing a heat diffusion step on the token graph.

Results

The approach improves performance across supervised, language modeling, and self-supervised learning tasks and yields faster-decaying spectra, indicating stronger token smoothing.

Contributions

It introduces a way to incorporate graph Laplacian updates into attention heads, enabling control over token means and variance, and demonstrates that such smoothing can be beneficial rather than harmful across multiple learning paradigms.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction