Eliciting Latent Predictions from Transformers with the Tuned Lens

By Nora Belrose, Zach Furman, Logan Smith, Danny Halawi, Igor V. Ostrovsky, Lev McKinney, Stella Biderman, Jacob Steinhardt. 2023

516 citations recorded by the source corpus.

We analyze transformers from the perspective of iterative inference, seeking to understand how model predictions are refined layer by layer. To do so, we train an affine probe for each block in a frozen pretrained model, making it possible to decode every hidden state into a distribution over the vocabulary. Our method, the tuned lens, is a refinement of the earlier"logit lens"technique, which yielded useful insights but is often brittle. We test our method on various autoregressive language models with up to 20B parameters, showing it to be more predictive, reliable and unbiased than the logit lens. With causal experiments, we show the tuned lens uses similar features to the model itself. We also find the trajectory of latent predictions can be used to detect malicious inputs with high accuracy. All code needed to reproduce our results can be found at https://github.com/AlignmentResearch/tuned-lens.

Subfields: Artificial Intelligence, Model Architectures, Safety, Robustness & Interpretability

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Efstratios Gavves
  2. Nicolas Papernot
  3. Leonard Bereska
  4. Yarin Gal
  5. Neel Nanda
  6. Jean Kaddour
  7. Hailey Schoelkopf
  8. Lintang Sutawika

In Model Architectures

  1. Stella Biderman
  2. Martin Wattenberg
  3. Hailey Schoelkopf
  4. Efstratios Gavves
  5. Nicolas Papernot
  6. Yarin Gal
  7. Vardan Papyan
  8. Edward Raff

In Safety, Robustness & Interpretability

  1. Nicolas Papernot
  2. Yarin Gal
  3. Stella Biderman
  4. Martin Wattenberg
  5. Oskar van der Wal
  6. Neel Nanda
  7. Andrew Lee
  8. Efstratios Gavves

Citations in the corpus