flâneur — a map of the web's best reading

Chapter 1: Transformer Interpretability - ARENA

learn.arena.education · 3,142 words · saved by 1 readers

Our first task is to extract hidden state activations from the model. For the Geometry of Truth approach, we extract the last-token activation at each specified layer. For declarative statements like "The city of Paris is in France.", the model's representation of whether the statement is true or false is concentrated at the final token position. Note - the Geometry of Truth paper probes specifically at the end-of-sentence punctuation token (the period / full stop). The datasets are designed so that every statement ends with a period, meaning the last token is always the period. This is important because the model's truth representation builds up over the sentence and is concentrated at the final punctuation mark. A few technical details to keep in mind. We use output_hidden_states=True in the forward pass to get all layer activations. outputs.hidden_states has length num_layers + 1: index 0 is the embedding output, and index i for i >= 1 is the output of layer i-1. We also need to han

1️⃣ Setup & visualizing truth representations Learning Objectives Extract hidden state activations from specified layers and token positions Implement PCA to visualize high-dimensional activations Observe that truth is linearly separable in activation space - even without supervision Understand which layers best represent truth via a layer sweep Extracting activations Our first task is to extract hidden state activations from the model. For the Geometry of Truth approach, we extract the last-token activation at each specified layer. For declarative statements like "The city of Paris is in Fran

Explore this link on the map →

related reading