SourceUnveiling and Manipulating Prompt Influence in Large Language Models
Prior work on the logit lens showed that the last token's hidden state can be projected through the LM head to yield an interpretable next-token distribution. This paper extends that observation to all input tokens at every layer, validating it empirically on five model families. Qualitative visualizations show that intermediate-layer projections produce meaningful, context-appropriate predictions (e.g., 'some boys discover' yields 'themselves' in mid-layers of LLaMA-2). Quantitatively, the mean KL divergence between each layer's projected distribution and the final layer's distribution decreases in an approximately monotonic fashion, indicating that each token's contribution converges synchronously at the final layer. This property holds across GPT-2, GPT-J, BLOOM, Pythia, and LLaMA-2 on diverse linguistic phenomena from BLIMP.