Jacobian Scopes: token-level causal attributions in LLMs
Toni J. B. Liu, Baran Zadeoğlu, Nicolas Boullé, Raphaël Sarfati, Christopher J. Earls
TL;DR
Jacobian Scopes tackle the problem of attributing LLM next-token predictions to individual prior tokens by exploiting the local linear relationship between inputs and the final hidden state. The authors introduce gradient-based, token-level attributions—Semantic, Fisher, and Temperature Scopes—each defined by a different projection direction and computational profile, enabling focus on specific logits, the full predictive distribution, or model confidence. They formalize the influence scores via the input-output Jacobian and Fisher information, provide efficient computation via backpropagation, and demonstrate applications across instruction, translation, and in-context learning, including bias and time-series extrapolation analyses. The work offers practical, open-source tools for mechanistic interpretability in LLMs, with implications for bias auditing, reasoning elucidation, and forecasting behavior in long-context regimes.
Abstract
Large language models (LLMs) make next-token predictions based on clues present in their context, such as semantic descriptions and in-context examples. Yet, elucidating which prior tokens most strongly influence a given prediction remains challenging due to the proliferation of layers and attention heads in modern architectures. We propose Jacobian Scopes, a suite of gradient-based, token-level causal attribution methods for interpreting LLM predictions. By analyzing the linearized relations of final hidden state with respect to inputs, Jacobian Scopes quantify how input tokens influence a model's prediction. We introduce three variants - Semantic, Fisher, and Temperature Scopes - which respectively target sensitivity of specific logits, the full predictive distribution, and model confidence (inverse temperature). Through case studies spanning instruction understanding, translation and in-context learning (ICL), we uncover interesting findings, such as when Jacobian Scopes point to implicit political biases. We believe that our proposed methods also shed light on recently debated mechanisms underlying in-context time-series forecasting. Our code and interactive demonstrations are publicly available at https://github.com/AntonioLiu97/JacobianScopes.
