MATH · IN · MODELS
methods / Causal Validation / Gradient × attention saliency

Gradient × attention saliency

Techniqueintermediate

Scores how much each attention connection between two token positions contributes to the output by multiplying the attention weight by the gradient of the loss with respect to it, summed over heads — a cheap, single-backward-pass way to localize where information flows before testing it causally with patching.

Used in (1 observation)

structure: Linear Direction · models: LLaMA-7B · paper: Label Words as Local Task Vectors in In-Context Learning