Spectral Filters, Dark Signals, and Attention Sinks

Nicola Cancedda
2/14/2024
cs.AIcs.CL
transformer-attention

No confident code implementation found for this paper.

Abstract

Projecting intermediate representations onto the vocabulary is an increasingly popular interpretation tool for transformer-based LLMs, also known as the logit lens. We propose a quantitative extension to this approach and define spectral filters on intermediate representations based on partitioning the singular vectors of the vocabulary embedding and unembedding matrices into bands.

Show full abstract

We find that the signals exchanged in the tail end of the spectrum are responsible for attention sinking (Xiao et al. 2023), of which we provide an explanation. We find that the loss of pretrained models can be kept low despite suppressing sizable parts of the embedding spectrum in a layer-dependent way, as long as attention sinking is preserved. Finally, we discover that the representation of tokens that draw attention from many tokens have large projections on the tail end of the spectrum.

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{cancedda2024spectral,
  title  = {Spectral Filters, Dark Signals, and Attention Sinks},
  author = {Nicola Cancedda},
  year   = {2024},
  eprint = {2402.09221},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.09221v1}
}

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/2402.09221.svg)](https://codeofpaper.com/paper/2402.09221)

Discussion