Entropy-Lens: The Information Signature of Transformer Computations

Riccardo Ali, Francesco Caso, Christopher Irwin, Pietro Liò
2/23/2025
cs.LGcs.AIcs.CV

No confident code implementation found for this paper.

Abstract

Transformer models map input token sequences to output token distributions, layer by layer. While most interpretability work focuses on internal latent representations, we study the evolution of these token-level distributions directly in vocabulary space. However, such distributions are high-dimensional and defined on an unordered support, making common descriptors like moments or cumulants ill-suited. We address this by computing the Shannon entropy of each intermediate predicted distribution, yielding one interpretable scalar per layer. The resulting sequence, the entropy profile, serves as a compact, information-theoretic signature of the model's computation. We introduce Entropy-Lens, a model-agnostic framework that extracts entropy profiles from frozen, off-the-shelf transformers. We show that these profiles (i) reveal family-specific computation patterns invariant under depth rescaling, (ii) are predictive of prompt type and task format, and (iii) correlate with output correctness. We further show that Rényi entropies yield similar results within a broad range of $α$ values, justifying the use of Shannon entropy as a stable and principled summary. Our results hold across different transformers, without requiring gradients, fine-tuning, or access to model internals.

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{ali2025entropylens,
  title  = {Entropy-Lens: The Information Signature of Transformer Computations},
  author = {Riccardo Ali and Francesco Caso and Christopher Irwin and Pietro Liò},
  year   = {2025},
  eprint = {2502.16570},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.16570v2}
}

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

Discussion