DecoderLens: Layerwise Interpretation of Encoder-Decoder Transformers

Anna Langedijk, Hosein Mohebbi, Gabriele Sarti, Willem Zuidema, Jaap Jumelet
10/5/2023
cs.CL

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

In recent years, many interpretability methods have been proposed to help interpret the internal states of Transformer-models, at different levels of precision and complexity. Here, to analyze encoder-decoder Transformers, we propose a simple, new method: DecoderLens. Inspired by the LogitLens (for decoder-only Transformers), this method involves allowing the decoder to cross-attend representations of intermediate encoder layers instead of using the final encoder output, as is normally done in encoder-decoder models. The method thus maps previously uninterpretable vector representations to human-interpretable sequences of words or symbols. We report results from the DecoderLens applied to models trained on question answering, logical reasoning, speech recognition and machine translation. The DecoderLens reveals several specific subtasks that are solved at low or intermediate layers, shedding new light on the information flow inside the encoder component of this important class of models.

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. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{langedijk2023decoderlens,
  title  = {DecoderLens: Layerwise Interpretation of Encoder-Decoder Transformers},
  author = {Anna Langedijk and Hosein Mohebbi and Gabriele Sarti and Willem Zuidema and Jaap Jumelet},
  year   = {2023},
  eprint = {2310.03686},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.03686v2}
}

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

Discussion