cs.CLSep 4, 2026

Influence Score and Transformers interpretability: Measure of the Effective Impact of Attention Heads at inference time

Authors: Lisa Bouger, Yannick Teglia, Philippe Loubet Moundi

Organizations: Thales CDI, France · Inria Paris, France · Sorbonne Université, France

Abstract

We propose an influence score to quantify the contribution of attention heads to classification decisions in Transformer-based models designed for prompt injection detection. The score combines directional influence on the logits with structural contribution within the residual stream, enabling a multi-scale analysis at the head, layer, and network levels. Applied to a DeBERTa model specialized for prompt injection detection, our framework reveals distinct decision behaviours between correct and erroneous predictions. Our method provides an effective compromise between fine-grained circuit analysis and global output-based methods, and offers a systematic way to study decision mechanisms in Transformer classifiers.

Figures & tables

Appendix figures & tables2 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Prompt Injection Detection is Regime-Dependent: A Deployment-Aware Evaluation with Interpretable Structural Signals

    May 26, 2026Akindoyin Akinrele, Shreyank N GowdaLanguage Model Safety EvaluationPrompt Injection Attacks on LLMs

  2. Importance Scoring of Transformer Attention Heads in Learning Tabular Data

    Aug 27, 2026Ahmad Jad Allah, Kazi F. Akhter, Md. Kamrozzaman Bhuiyan +1Attention Head AnalysisTransformer Attention